How to change default request timeout for Selenium 2?

I am currently using Selenium 2.0a2 in Java to access the Internet using an instance of HtmlUnitDriver . The problem I am facing is that when I try to access slow websites, the request expires. How can I increase the wait time of WebDriver before you select a timeout exception?

+4
source share
1 answer

wait = new WebDriverWait (driver, 10); wait.until (new VisibilityOfElementLocated (By.id ("whatever")));

10 is the wait time.

+2
source

Source: https://habr.com/ru/post/1306086/


All Articles