You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebElementFacade parent = element("//parent-locator");
WebElementFacade child = parent.then(".//child-locator");
// some actions after which 'parent' and 'child' will be visible on page
parent.waitUntilVisible();
child.waitUntilVisible();
test fails on second line
Step failed
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//parent-locator"}
(Session info: chrome=119.0.6045.161)
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Build info: version: '4.15.0', revision: '1d14b5521b'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.21'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [aa4fe1f879a8fec95dc02541729f222e, findElement {using=xpath, value=//parent-locator}]
Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 119.0.6045.161, chrome: {chromedriverVersion: 119.0.6045.105 (38c72552c5e..., userDataDir: C:\Users\yevma\AppData\Loca...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:61250}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:cdp: ws://localhost:61250/devtoo..., se:cdpVersion: 119.0.6045.161, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: aa4fe1f879a8fec95dc02541729f222e
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:52)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:191)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:200)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:175)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:607)
at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElement(ElementLocation.java:165)
at org.openqa.selenium.remote.ElementLocation.findElement(ElementLocation.java:59)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:364)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:358)
at net.thucydides.core.webdriver.WebDriverFacade.findElement(WebDriverFacade.java:259)
at net.serenitybdd.core.pages.WebElementResolverByLocator.resolveForDriver(WebElementResolverByLocator.java:25)
at net.serenitybdd.core.pages.WebElementFacadeImpl.getResolvedElement(WebElementFacadeImpl.java:188)
at net.serenitybdd.core.pages.WebElementFacadeImpl.getElement(WebElementFacadeImpl.java:183)
at net.serenitybdd.core.pages.WebElementFacadeImpl.findBy(WebElementFacadeImpl.java:231)
at net.serenitybdd.core.pages.WebElementFacadeImpl.then(WebElementFacadeImpl.java:221)
The text was updated successfully, but these errors were encountered:
When you use parent.waitUntilVisible(), Selenium will try to resolve the parent element before calling waitUntilVisible(), so it may timeout before it gets to the waitUntilVisibile() method. You can avoid this issue by using the withTimeoutOf() method.
no such element: Unable to locate element: {"method":"xpath","selector":"//parent-locator"} means Selenium can't find the element. You might need to wait until it is present.
yep, but I expect that http requests to get elements should be sent when I execute *.waitUntilVisible(). first two lines just elements initialization like we do using @findby annotation
What happened?
No response
What did you expect to happen?
No response
Serenity BDD version
latest
JDK version
11
Execution environment
No response
How to reproduce the bug.
I try to use code like:
test fails on second line
The text was updated successfully, but these errors were encountered: