Skip to content

Small update to "wait_for_ready_state_complete()"

Compare
Choose a tag to compare
@mdmintz mdmintz released this 30 Oct 20:30
· 4577 commits to master since this release
e7d0e6b

Small update to wait_for_ready_state_complete()

(This completes the change from the previous release)

A change was made that may impact tests that have alert pop-ups when opening a new page via open or click. This was done to prevent an issue that could occur if developers set custom implicit waits in their code.
The method: wait_for_ready_state_complete() (which SeleniumBase uses for smart-waiting) runs some JavaScript to check that the readyState of the page is "complete" before moving on, but that automatically dismisses alert pop-ups that may appear. If you are expecting to deal with an alert pop-up after going to a new page via self.open(URL) or self.click(SELECTOR), consider using self.driver.get(URL) or self.find_element(SELECTOR).click() instead, which won't use the SeleniumBase smart-waiting that may dismiss alert pop-ups before the user can call custom code to interact with them, such as self.wait_for_and_accept_alert() or self.wait_for_and_dismiss_alert().