Hegwin.Me

The bitterest tears shed over graves are for words left unsaid and deeds left undone.

How to handle javascript confirm with selennium webdriver

Selenium driver 对 JS Confirm 的处理

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