java - Selenium with chrome return exception when handling alert -


i’ve been trying handle alert in selenium using chrome 54.0.2840.87 (currently latest chrome version) , chromedriver 2.25 (currently latest chromedriver) without success. i’ve made sure alert , not popup (there’s no inspect element option).

also i’ve made sure there’s no timing issue, placing breakpoint before code handle alert, gives exception: org.openqa.selenium.noalertpresentexception: no alert open

this code i’ve been trying use, without success: driver.switchto().alert().accept();

also tried wait alert present using code, without success: wait.until(expectedconditions.alertispresent());

also tried use javascript executescript accept alert without success: ((javascriptexecutor)m_driver).executescript("window.confirm = function(msg){return true;};");

link alert i’ve received: https://i.stack.imgur.com/n8fce.png

thanks help.

this not alert box. won't able handle in traditional way. workaround, can disable protocol handler box chrome local state files.

for windows: local state file can found under c:\documents , settings\<username>\local settings\application data\google\chrome\user data.

edit "local state" file, , add line under "caxhost": false, include protocol.

for linux: follow steps here: https://askubuntu.com/questions/465586/how-to-reset-external-protocol-handler-in-chrome


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -