0

I am running selenium tests and getting below error abruptly. The test runs are not passing consistently every time. Sometimes it fails and sometimes it pass. And the step at which it fails is also not fixed, it fails at different step every time.

Error message: Timeout exception: Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacade for selenium webdriver

Below are the versions I am using: Chrome - v65 Chrome driver - v2.38 Selenium - v2.53 Serenity - v1.1.36

I am not writing the code as its not fixed at which step it will fail. Can anyone please help?

Adding the error trace:

<?xml version="1.0" encoding="UTF-8"?><testsuite errors="1" failures="0" name="To create project and allocate resources" skipped="0" tests="12" time="1280.85" timestamp="2018-04-117 10:22:25"><testcase name="UC_PM_01_Create Project from Template"/><testcase name="UC_PM_05_Populate PMO Data"/><testcase name="UC_PM_15_Resource Allocation"><error message="Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca&#10;Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'&#10;System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'&#10;Driver info: driver.version: unknown&#10;Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'&#10;System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'&#10;Driver info: driver.version: unknown" type="org.openqa.selenium.TimeoutException">Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'
Driver info: driver.version: unknown
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'
Driver info: driver.version: unknown</error><system-err>Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'
Driver info: driver.version: unknown
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'
Driver info: driver.version: unknown&#13;
com.org.macquarie.clarity.actions.WebActions.verifyElementIsDisplayed(WebActions.java:296)&#13;
com.org.macquarie.clarity.steps.HomeSteps.clickHomeMenuLinks(HomeSteps.java:30)&#13;
</system-err></testcase><testcase name="Uc pm 18  adding resource to team will update~rmw task"/></testsuite>
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
user3649712
  • 13
  • 1
  • 5

1 Answers1

0

This error message...

<error message="Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca&#10;Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'&#10;System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'&#10;Driver info: driver.version: unknown&#10;Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'&#10;System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'&#10;Driver info: driver.version: unknown" type="org.openqa.selenium.TimeoutException">Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'

...implies that waiter raised TimeoutException and was unable to locate the elelemt.

However your main issue is the version compatibility between the binaries you are using as follows :

  • Your Selenium Client version is 2.53.0 of 2016-03-15 10:43:46 which is more then 2 years older.
  • Your JDK version is 1.8.0-ea which is pretty ancient.

So there is a clear mismatch between the JDK v8u0-ea, Selenium Client v2.53.0, Chrome v65.x and ChromeDriver v2.38

Solution

  • Upgrade JDK to recent levels JDK 8u162.
  • Upgrade Selenium to current levels Version 3.11.0.
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
  • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352