Closed WaterLoran closed 2 months ago
By default, the pageLoadStrategy
is set to "normal", but it can be changed via command-line option:
--pls=PLS # (Set pageLoadStrategy on Chrome: "normal", "eager", or "none".)
Or changed via method arg to Driver()
/ SB()
: (Eg. pls="none"
)
The pageLoadStrategy
determines how long the page waits when it opens a new page. If your script isn't waiting long enough, then you may need to wait for a specific element on a page. Lots of waiting methods for that:
self.wait_for_element_visible(selector)
self.wait_for_element_not_visible(selector)
self.wait_for_element_present(selector)
self.wait_for_element_absent(selector)
Adjust scripts as needed.
Thank you very much for your answer I will optimize my framework well