0

So i want to wait until page load using Selenium.

This is my implementation:

public static boolean isPageLoad(String url) {
    try {
        new WebDriverWait(driver, 30).until(ExpectedConditions.urlToBe(url));
        return true;
    } catch (Exception ex) {
        return false;
    }
}

So do you think this should be enough or i need maybe to add another check for example search also the body tag ?

0

1 Answer 1

1

You can just set the pageLoadTimeout when initializing the WebDriver

WebDriver driver = new ChromeDriver();
driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.