Answer the question
In order to leave comments, you need to log in
Selenium WebDriver how to stop page from loading?
I am using Selenium2 WebDriver, Python language.
The problem is the following. There are sites with eternal page loading, that is, some js elements on the page that cannot be loaded in any way.
For example:
driver = webdriver.Firefox()
driver.get("http://science.compulenta.ru/698674/")
Answer the question
In order to leave comments, you need to log in
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("webdriver.load.strategy", "unstable");
WebDriver driver = new FirefoxDriver(profile);
driver.manage().timeouts().pageLoadTimeout(30000, TimeUnit.MILLISECONDS);
driver.get(" toster.ru ");
When using this loading strategy, the driver will not wait for the page to fully load.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question