Hegwin.Me
Thoughts grows up by feeding itself with its own words.
Home
Tools
WoW Battle Pet
Meow Etymons
About
How to handle javascript confirm with selennium webdriver
Selenium driver 对 JS Confirm 的处理
JavaScript
Selenium
Ruby
Jul 21, 2014
JS popup confirmation box is often used in web development, how does the feature test script handle this popup box? page.driver.browser.switch_to.alert.accept # => click OK page.driver.browser.switch_to.alert.dismiss # => click Cancel page.driver.browser.switch_to.alert.text #=> return popup text