3

So, I found the pageLoadStrategy and have been using it for my script. Only problem, is that I want it to not be active at the beginning of the script but active near the end of the script. Here is where I pulled the pageLoadStrategy code: pageLoadStrategy Website

What I have tried:

  1. I have tried moving the script, the script that I used is shown below, to the place where I want it to become active, but it does not change the pageLoadStrategy. It just performs as normal.
  2. I have also tried putting it twice, one of them being on "normal" and the other on "none", but it looks like the 1st pageLoadStrategy code is overtaking the other pageLoadStrategy of "none".

The Script for pageLoadStrategy:

from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

caps = DesiredCapabilities().CHROME
# caps["pageLoadStrategy"] = "normal"  #  Waits for full page load
caps["pageLoadStrategy"] = "none"   # Do not wait for full page load
driver = webdriver.Chrome(desired_capabilities=caps, executable_path="path/to/chromedriver.exe")

This is the code that I am using. For mine, I am trying to use both the caps["pageLoadStrategy"] = normal and the caps["pageLoadStrategy"] = "none"

Am I able to use both of these in a single script?

Thanks in advance!

0 Answers0