Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经为这个问题做了大量的研究,但遗憾的是没有发现任何对 Firefox 4 有用的东西。这个选项在 3.6 中运行良好:
a = page.driver.browser.switch_to.alert if a.text == 'OK' a.dismiss else a.accept end
不幸的是,当它弹出时手动单击“确定”不是一个选项。我也为此尝试了各种 JavaScript 选项(其中一个本质上是通过预先发送值来“欺骗”提示)。
感谢您的时间,
-R
我遇到了同样的问题,到目前为止我发现的唯一解决方案是降级到 Firefox 3.6.x