Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-74114 Make Liferay compatible with version 2.0 tests in the Portlet 3.0 TCK
  3. LPS-95035

Portlet 3.0 TCK: TestModule1_PortletCanBeRendered fails to find portlet content using WebDriver

    Details

      Description

      Steps to reproduce issue:

      1. Run test for TestModule1_PortletCanBeRendered

      Expected result: Element is found and test passes
      Result: Test fails with the following exception:

           [exec] test[TestModule1_PortletCanBeRendered](javax.portlet.tck.driver.TCKLiferayTestDriver)  Time elapsed: 5.292 sec  <<< FAILURE!
           [exec] java.lang.AssertionError: Test case TestModule1_PortletCanBeRendered failed. 
           [exec] Exception: 
           [exec] 	at org.openqa.selenium.support.ui.ExpectedConditions.lambda$findElement$0(ExpectedConditions.java:896)
           [exec] 	at java.util.Optional.orElseThrow(Optional.java:290)
           [exec] 	at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:895)
           [exec] 	at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44)
           [exec] 	at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:206)
           [exec] 	at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:202)
           [exec] 	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:248)
           [exec] 	at javax.portlet.tck.driver.TCKTestDriver.accessPage(TCKTestDriver.java:257)
           [exec] 	at javax.portlet.tck.driver.TCKLiferayTestDriver.test(TCKLiferayTestDriver.java:143)
      

      After some debugging, it turns out that WebDriver is unable to find the element with the name attribute value of "TestModule1_PortletCanBeRendered". Running this check in the browser with document.getElementsByName("TestModule1_PortletCanBeRendered")[0] returns the element that is present on the page.

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            anthony.chu Anthony Chu
            Recent user:
            Anthony Chu
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              2 years, 1 week, 6 days ago

                Packages

                Version Package