Selenium can't accept alert by google chrome [java] -


this question has answer here:

selenium can't accept alert google chrome.

    driver.get("http://bubble-export.com/lpg2/");     driver.get("http://google.com");     alert alert = driver.switchto().alert();     alert.accept(); 

firefox , ie works well.buy google chrome dose not work!!

how can accept alert google chrome!?

  (session info: chrome=44.0.2403.89)    (driver info: chromedriver=2.9.248307,platform=mac os x 10.9.5 x86_64)  build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-27 00:00:10'     os.name: 'mac os x', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.8.0_40'  driver info: org.openqa.selenium.chrome.chromedriver 

instead of accepting alert. can hack.which remove alert appearing

    webdriver driver = new chromedriver();     driver.get("http://bubble-export.com/lpg2/");     javascriptexecutor js = (javascriptexecutor) driver;     js.executescript("window.onbeforeunload = function() {};");     driver.get("http://google.com"); 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -