Skip to content

Chrome driver not waiting for more than 60 seconds  #9892

@Sriram-S

Description

@Sriram-S

🐛 Bug Report

Simulating 3G/4G network capabilities which is causing page to load slow than usual. Even though implicit wait/page load time out is set , its not considering any of those. Default timeout of 60 seconds is always considered.
#6650 - Not seeing any constructor in chrome driver to override the same in java per this reference .

To Reproduce

I have set implicit wait and tried using page load timeout to be set as 120 seconds.
Since running in slow condition, page load takes more than usual and getting timeout after 60 seconds.

Detailed steps to reproduce the behavior:

Expected behavior

There should be some way in which we can make driver wait for more than 60 seconds .

Test script or set of commands reproducing this issue

    System.setProperty("webdriver.chrome.driver","chromedriver-3");
    ChromeOptions co = new ChromeOptions();
    co.addArguments("--kiosk");
    ChromeDriver driver = new ChromeDriver(co);
    driver.manage().timeouts().pageLoadTimeout(120,TimeUnit.SECONDS);
    DevTools devTools = driver.getDevTools();
    devTools.createSession();
    devTools.send(Network.emulateNetworkConditions(
            false,
            500,
            4000,
            2000,
            Optional.of(ConnectionType.CELLULAR3G)
    ));
    driver.get("https://www.youtube.com/feed/library");
    driver.findElement(By.xpath("//div[@id='button']//*[contains(text(),'Sign in')]")).click();

Exception:

  Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Request timeout to localhost/127.0.0.1:8003 after 60000 ms
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
at org.asynchttpclient.netty.NettyResponseFuture.get(NettyResponseFuture.java:201)
at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:55)
... 39 more
 Caused by: java.util.concurrent.TimeoutException: Request timeout to localhost/127.0.0.1:8003 after 60000 ms
at org.asynchttpclient.netty.timeout.TimeoutTimerTask.expire(TimeoutTimerTask.java:43)
at org.asynchttpclient.netty.timeout.RequestTimeoutTimerTask.run(RequestTimeoutTimerTask.java:50)
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:680)
at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:755)
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:483)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)

Any alternative in place to have this timeout set by user?

Environment

OS: macOS
Browser:Chrome
Browser version: 94.0
Browser Driver version: 94.0
Language Bindings version: 4.0.0-alpha-4

Metadata

Metadata

Assignees

No one assigned

    Labels

    J-awaiting answerQuestion asked of user; a reply moves it to triage again

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions