Questions tagged [pageloadstrategy]

When a new document loads, the point at which the command returns the control is determined by the session’s page loading strategy.

When a new document loads, the point at which the command returns the control is determined by the session’s page loading strategy.

The normal state causes the control to return after the load event fires on the new page, eager causes the control to return after the DOMContentLoaded event fires, and none causes the control to return immediately.

The following is the table of page load strategies that links the pageLoadStrategy capability keyword to a page loading strategy state, and shows which document readiness state that corresponds to it:

page loading strategy

References

28 questions
1
vote
1 answer

How to stop test if page taking too long to load in selenium python

I'm testing a website and all is good with me except when the page is taking too much time then selenium keeps on searching for the element. I've tried to use driver.set_page_load_timeout(5) but still keeps on loading forever. Here is the code: from…
1
vote
1 answer

how to display a textual carousel while the page loading the images

I've got an image heavy web page. 200 images totaling 100Mb or so. I can do lazy loading them but I'd like to try a different technique. Display a "page-loading-indicator" screen while downloading the images behind the scenes ( to ache ) but more…
Average Joe
  • 4,521
  • 9
  • 53
  • 81
0
votes
0 answers

Selenium window.stop(); does not work when pageLoadStrategy = "none" in undetected-chromedriver

I'm using undetected_chromedriver and trying to stop the page loading, but the code stops when I call execute_script("window.stop();") and waits for the page to finish loading. The code is still waiting for the page to finish loading. Code: import…
0
votes
2 answers

Web Driver Wait is not working when page load strategy is set to none

Selenium Version: 4.7.2 I only want to wait for specific page to load so I want to disable the default behavior of driver page load strategy. I disable it with the following code. options = webdriver.ChromeOptions() options.page_load_strategy =…
0
votes
3 answers

Python: how to open new tab without waiting for current tab page loading in Python Selenium

I am opening 10 tabs (same URL) in chrome browser Successfully. but problem is that, my URL takes 1 minute to load page and i don't want to wait 1 minute at each tab. i need to let it load and want to open another tab and i know final tab compulsory…
0
votes
1 answer

website search bar doesn't work for python selenium

I would like auto-click the website and search for the information, but somehow the website cannot search, and keep loading. Or just close quickly after it print the key in search bar. I would like auto-click the website and search for the…
0
votes
1 answer

How to extract the comments count correctly

I am trying to extract number of youtube comments and tried several methods. My Code: from selenium import webdriver import pandas as pd from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from…
0
votes
1 answer

Don't wait for a page to load using Selenium ChromeDriver in vba excel

i just want to get the final url from a redirect. I can read this with url = GC2.Url but the end takes a long time to load completely. how do i get it now that as soon as i call the link with my 2nd selenium instance the webite doesn't wait for it…
0
votes
1 answer

Best way to deal with slow pageloads after GET using Selenium

What is the best way to deal with driver->get(URL) and slow page load? I basically have a for loop that runs 3 times at most. Within that loop, I have a try/catch block. In the try block, it loads the page with get OR…
Rick
  • 806
  • 7
  • 15
0
votes
1 answer

How to immediately invoke driver.quit() in Selenium?

Whenever I call driver.quit() it waits for the website to first complete loading then it closes the browser, is there any way I can force close the browser immediately?
user15573857
0
votes
1 answer

Undefined class constant 'pageLoadStrategy' {"exception":"[object] error during execution with Selenium PHP and Laravel

i'm building web test code but i have error when first start there seems to be something wrong at the beginning of code, but can't catche because don't know -error local.ERROR: Undefined class constant 'pageLoadStrategy' {"exception":"[object]…
0
votes
1 answer

Switch pageLoadStrategy from eager to normal for existing driver

I set the pageLoadStrategy as eager but now the method I wrote to close popups of the website is not working(it works when pageLoadStrategy is normal). So I want to know how to change the pageLoadStrategy from eager to normal, close the popups, and…
-1
votes
1 answer

Jmeter chrome webdriver - set pageloadstrategy to none

in Jmeter jp@gc - Chrome Driver Config default configuration for pageloadstrategy is normal How i can change it to none? i don't see an option in the Chrome driver config? it can be set in the jp@gc - WebDriver Sampler? I'm using javascript…
1
2