Skip to content

Commit

Permalink
Use 'switch_to.alert' instead of deprecated 'switch_to_alert' (#675)
Browse files Browse the repository at this point in the history
```
=== warnings summary =====================================================
.../splinter/driver/webdriver/__init__.py:305: DeprecationWarning: use driver.switch_to.alert instead
  return AlertElement(self.driver.switch_to_alert())
=======================================================================
```

See the docs: https://selenium-python.readthedocs.io/api.html?highlight=switch_to#selenium.webdriver.remote.webdriver.WebDriver.switch_to_alert
  • Loading branch information
jacebrowning authored and andrewsmedina committed Jan 31, 2019
1 parent 838d0f6 commit 32f11ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion splinter/driver/webdriver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def is_element_not_present_by_id(self, id, wait_time=None):
return self.is_element_not_present(self.find_by_id, id, wait_time)

def get_alert(self):
return AlertElement(self.driver.switch_to_alert())
return AlertElement(self.driver.switch_to.alert())

def is_text_present(self, text, wait_time=None):
wait_time = wait_time or self.wait_time
Expand Down

0 comments on commit 32f11ff

Please sign in to comment.