1

Im getting a 'security warning' popup box in Firefox.

Im using Python and Selenium

driver.switch_to().alert().accept()

TypeError: 'SwitchTo' object is not callable

Any suggestions?

DJ Howarth
  • 562
  • 2
  • 12
  • 30

1 Answers1

1

Here is the correct syntax:

driver.switch_to.alert.accept()

Or:

driver.switch_to_alert().accept()

Or:

Alert(driver).accept()
Florent B.
  • 41,537
  • 7
  • 86
  • 101