开发者

Using Capybara + Selenium, how do I select dialog box (confirm) options in the new Firefox 4?

开发者 https://www.devze.com 2023-02-20 02:25 出处:网络
I have done a solid amount of research for this issue and have sadly found nothing useful in regards to Firefox 4.

I have done a solid amount of research for this issue and have sadly found nothing useful in regards to Firefox 4. This option worked fine in 3.6:

a开发者_如何学运维 = page.driver.browser.switch_to.alert
if a.text == 'OK'
  a.dismiss
else
  a.accept
end

Unfortunately, simply clicking on the "OK" manually when it pops up is not an option. I've tried the various JavaScript options for this, as well (where one essentially "tricks" the prompt by sending it values beforehand).

Thank you for your time,

-R


I've had the same problem, the only solution I've found so far is downgrading to Firefox 3.6.x

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号