This is exactly how I ran into this problem. I will use this path until chrome supports pageload .
I installed an extension in chrome called Stop load, and I set the stop to 5 seconds.
Then I installed my driver with the default setting -
DesiredCapabilities capabilities = DesiredCapabilities.chrome(); capabilities.setCapability("chrome.switches", Arrays.asList("--user-data-dir="+System.getProperty("user.home")+"\\AppData\\Local\\Google\\Chrome\\User Data")); System.setProperty("webdriver.chrome.driver", "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chromedriver.exe"); driver = new ChromeDriver(capabilities);
If the page in chrome does not load after 5 seconds, your extension will take care of this by killing it in 5 seconds.
In a sense, it works as implicit if you set the correct break time in the extension
Vijay source share