Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems like gecko and chrome ignores serenity.conf implicit wait #2751

Closed
xMagiciaNx opened this issue Mar 20, 2022 · 2 comments
Closed

Seems like gecko and chrome ignores serenity.conf implicit wait #2751

xMagiciaNx opened this issue Mar 20, 2022 · 2 comments

Comments

@xMagiciaNx
Copy link

Tried with both gecko and chrome drivers, my serenity.conf is the following:

webdriver { driver = firefox autodownload = false timeouts { implicitlywait = 5000 } }

I am trying to run a simple test, like navigating and click, but always I get this before the test start:

Driver info: org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$gYve0wGQ Command: [999a0dc564fa691a6d64f8b271e44bfc, executeScript {script=return jQuery.active == 0, args=[]}] Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 99.0.4844.51, chrome: {chromedriverVersion: 99.0.4844.51 (d537ec02474b5..., userDataDir: /tmp/.com.google.Chrome.7Koac7}, goog:chromeOptions: {debuggerAddress: localhost:40753}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}

Please take a look at timeouts: {implicit: 0, pageLoad: 300000, script: 30000} . Seems like there is no way around to change this parameter, drivers ignore the setting.

If I set something like the following:

firefox {
  pageLoadStrategy = none
}

This is working as expected. I don't know if I did something wrong but I have no other options set programmatically or by file.
After 3 days of searching and digging, here I am :D

@wakaleo
Copy link
Member

wakaleo commented Mar 23, 2022

Does the test work otherwise? The implicit wait parameter is invoked when web elements are created, not when the driver is set up.

@xMagiciaNx
Copy link
Author

xMagiciaNx commented Mar 24, 2022

Seems like the following functions works like a charm, if anyone has any issue just use those:
(Replaced implicit waits with duration, as below)

WebElementFacade elem = find(By.xpath("//div[normalize-space()=\""testElement"\"]"));
new WebDriverWait(getDriver(), Duration.ofSeconds(10)).until(x -> elem.isDisplayed());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants