Method: Selenium::Client::GeneratedDriver#get_alert
- Defined in:
- lib/selenium/client/legacy_driver.rb
permalink #get_alert ⇒ Object
Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail. Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog. Selenium does NOT support JavaScript alerts that are generated in a page’s onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
850 851 852 |
# File 'lib/selenium/client/legacy_driver.rb', line 850 def get_alert() return string_command("getAlert", []) end |