I am scraping a webpage using Selenium webdriver in Python
The webpage I am working on, has a form. I am able to fill the form and then I click on the Submit button.
I am using Ruby bindings but here what I found in Selenium Python Bindings 2 documentation: http://readthedocs.org/docs/selenium-python/en/latest/index.html
Selenium WebDriver has built-in support for handling popup dialog boxes. After you’ve triggerd and action that would open a popup, you can access the alert with the following:
alert = driver.switch_to_alert()
Now I guess you can do something like that:
if alert.text == 'A value you are looking for'
alert.dismiss
else
alert.accept
end
Hope it helps!