Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium WebDriver very slow to load certain pages

In testing a website I'm finding certain pages on our test environment incredibly slow to load when using WebDriver (Consistently slow across The IE, Chrome and Firefox driver), however when visiting the same page in any other those browsers normally it loads in a much more timely way. Every indication seems to show the request for the page happening quickly, and the lag coming from downloading/rendering. Has anyone else encountered the same issue, and has a workaround/fix?

Thanks

like image 881
niall Avatar asked Oct 01 '12 21:10

niall


People also ask

Why is Selenium WebDriver so slow?

Generally, Selenium WebDriver scripts are very slow because they run through the browser. There are multiple ways that help to increase their speed. They are as follows: 1)Use Fast selectors.

How does Selenium handle page loading issues?

There are three ways to implement Selenium wait for page to load: Using Implicit Wait. Using Explicit Wait. Using Fluent Wait.


1 Answers

Selenium doesn't seem to cache any data etc - or it clears the caches whenever it closes. Is it possible that the pages that render slowly are downloading libraries, fonts or CSS files that are already cached in your normal browser instance? Things like jquery and lightbox etc can soon add up.

like image 116
user1180316 Avatar answered Oct 08 '22 12:10

user1180316