Demo project's tests failed with TimeoutException-->NoSuchElementException


#1

Reporting against v0.3.1

All tests in demo project were executed with Google Chrome endpoint.
Two tests failed

Following errors were noted in the test reports (\demoshop\target\surefire-reports\index.html)

checkForTotalAmountUsing1Item
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.cssSelector: #site-navigation .menu:nth-child(2) [href=“http://demoshop.webtestit.com/checkout/”] (tried for 10 second(s) with 500 milliseconds interval)
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:82)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272)
at uitest.pageobjects.HeaderPo.proceedToCheckout(HeaderPo.java:29)
at uitest.tests.TC1.checkForTotalAmountUsing1Item(TC1.java:43)
Caused by: org.openqa.selenium.NoSuchElementException: Cannot locate an element using By.cssSelector: #site-navigation .menu:nth-child(2) [href=“http://demoshop.webtestit.com/checkout/”]
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘3.10.0’, revision: ‘176b4a9’, time: ‘2018-03-02T19:03:16.397Z’
System info: host: ‘DESKTOP-6GQ3O9V’, ip: ‘100.70.186.204’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_161’
Driver info: driver.version: unknown
at org.openqa.selenium.support.ui.ExpectedConditions.lambda$findElement$0(ExpectedConditions.java:896)
at java.util.Optional.orElseThrow(Optional.java:290)
at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:895)
at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:206)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:202)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)
… 31 more
… Removed 29 stack frames
checkForTotalAmountUsing3Items
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.cssSelector: #site-navigation .menu:nth-child(2) [href=“http://demoshop.webtestit.com/checkout/”] (tried for 10 second(s) with 500 milliseconds interval)
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:82)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272)
at uitest.pageobjects.HeaderPo.proceedToCheckout(HeaderPo.java:29)
at uitest.tests.TC1.checkForTotalAmountUsing3Items(TC1.java:22)
Caused by: org.openqa.selenium.NoSuchElementException: Cannot locate an element using By.cssSelector: #site-navigation .menu:nth-child(2) [href=“http://demoshop.webtestit.com/checkout/”]
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘3.10.0’, revision: ‘176b4a9’, time: ‘2018-03-02T19:03:16.397Z’
System info: host: ‘DESKTOP-6GQ3O9V’, ip: ‘100.70.186.204’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_161’
Driver info: driver.version: unknown
at org.openqa.selenium.support.ui.ExpectedConditions.lambda$findElement$0(ExpectedConditions.java:896)
at java.util.Optional.orElseThrow(Optional.java:290)
at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:895)
at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:206)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:202)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)
… 31 more
… Removed 29 stack frames


#2

Hi @janesh!

We recently updated our sample and the demoshop to https. A couple of day’s ago.
From your stacktrace i can see that the selectors arn’t at the latest revision.

Please try this, and let me know if the issue is resolved.


archived #3