There are no items in your cart
Add More
Add More
Item Details | Price |
---|
Wed Jun 29, 2022
By default, Selenium WebDriver follows the normal pageLoadStrategy when it loads any page which means it waits until the entire page is loaded. In scenarios where it takes a lot of time to load the page, it is always recommended to stop downloading additional resources like images, css, js, etc… by using the eager pageLoadStrategy.
In single page applications like Angular and React, once the dynamic content is already loaded then clicking on a link or performing some action within the page will not make a new request to the server as the content is dynamically loaded at the client side without a full page refresh. These applications can load many views dynamically without any server requests, so pageLoadStrategy will always show Complete status which is not always true and it leads to failure in Selenium scripts.
WebDriver pageLoadStrategy supports the following values:
1. NORMAL
This will make Selenium WebDriver to wait for the entire page is loaded. When set to normal, Selenium WebDriver waits until the load event fire is returned. By default normal is set to browser if none is provided.
eager
as pageLoadStrategy.Bijan Patel
A California-based travel writer, lover of food, oceans, and nature.