how can i remove notifications and alerts from browser? selenium python 2.7.7

前端 未结 6 2050
闹比i
闹比i 2020-12-01 15:43

I am trying to submit information in a webpage, but selenium throws this error:

UnexpectedAlertPresentException: Alert Text: This page is asking you

6条回答
  •  渐次进展
    2020-12-01 15:51

    Usually with browser settings like this, any changes you make are going to get throws away the next time Selenium starts up a new browser instance.

    Are you using a dedicated Firefox profile to run your selenium tests? If so, in that Firefox profile, set this setting to what you want and then close the browser. That should properly save it for its next use. You will need to tell Selenium to use this profile though, thats done by SetCapabilities when you start the driver session.

提交回复
热议问题