Stop alert from automatically closing. #1284
-
Hello, im uploading a file and if it fails the upload an alert pops up, but it instantly gets closed so i cant interact with it. What else could i try to get it working?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@RomanJus If you change The existing behavior is the default one, unless you use a custom_settings file, such as https://github.com/seleniumbase/SeleniumBase/blob/master/examples/custom_settings.py, and then then change Any one of the above two solutions should be good enough. |
Beta Was this translation helpful? Give feedback.
@RomanJus If you change
sb.click(UserModal.MODAL_ACCEPT_BTN)
to
sb.find_element(UserModal.MODAL_ACCEPT_BTN).click()
does it work correctly for you?
The existing behavior is the default one, unless you use a custom_settings file, such as https://github.com/seleniumbase/SeleniumBase/blob/master/examples/custom_settings.py, and then then change
WAIT_FOR_ANGULARJS
to be False. That executes JS to make sure everything has loaded, however, if you execute any JS while an alert is up, it'll dismiss the alert (this is part of how Selenium works).Any one of the above two solutions should be good enough.