Skip to content

Detect browser crash #3028

@alexamirante

Description

@alexamirante

Meta -

OS: Linux Ubuntu 14.04

Selenium Version: 3.0.1

Browser: Chrome

Browser Version: 54.0.2840.71

Expected Behavior -

I'm trying to get notified of browser crashes by periodically issuing a webDriver.getTitle(). I would expect it to throw a WebDriverException as soon as the browser is not reachable.

Actual Behavior -

A WebDriverException, is actually thrown when the browser is not reachable, but only after ~2 minutes (127 seconds). I guess some timeout fires at that point.

Is such timeout configurable somewhere? I tries the various WebDriver.Timeouts but had no effect.

Steps to reproduce -

Through the Java bindings:

    WebDriver webDriver = new ChromeDriver();
    webDriver.get("https://www.google.com");
    while(true) {
        try {
            webDriver.getTitle();
            Thread.sleep(1000);
        } catch(WebDriverException | InterruptedException e) {
            e.printStackTrace();
            break;
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions