Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 06f9b82

Browse files
authored
Update navigating.rst
In Popup dialogs of alert, switch_to_alert() is deprecated. So, updateded to the latest supported one "switch_to.alert" like use alert = driver.switch_to.alert instead alert = driver.switch_to_alert()
1 parent 05fd35e commit 06f9b82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/navigating.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Selenium WebDriver has built-in support for handling popup dialog
191191
boxes. After you've triggered action that would open a popup, you
192192
can access the alert with the following::
193193

194-
alert = driver.switch_to_alert()
194+
alert = driver.switch_to.alert
195195

196196
This will return the currently open alert object. With this object,
197197
you can now accept, dismiss, read its contents or even type into a

0 commit comments

Comments
 (0)