如何处理运行 Chrome Webdriver 的警报?
我在运行 C# webdriver 时遇到问题。
每当我单击生成弹出窗口的链接时,单击命令都会等待 30 秒左右,然后失败并显示:
http://localhost:48808/session/92d33d6032c3ac55cb8dc903adc2297b/element/:wdc:1318515744285/click
这是chrome中的已知问题吗?,测试在IE和Firefox中运行没有问题。
有问题的链接如下所示:
<a class="button" id="ContentPlaceHolderCMSEdit_CMSToolbar1_btnDelete" onclick="return confirm('Are you sure you want to delete this page? It cannot be undone.');" href="javascript:__doPostBack('ctl00$ContentPlaceHolderCMSEdit$CMSToolbar1$btnDelete','')">
I have a problem with chrome running C# webdriver.
Whenever i click a link that spawns a popup the click command waits for 30sec or so and then fails with:
http://localhost:48808/session/92d33d6032c3ac55cb8dc903adc2297b/element/:wdc:1318515744285/click
Is this a known issue in chrome?, the test runs without problems in IE and Firefox.
The link in question looks like this:
<a class="button" id="ContentPlaceHolderCMSEdit_CMSToolbar1_btnDelete" onclick="return confirm('Are you sure you want to delete this page? It cannot be undone.');" href="javascript:__doPostBack('ctl00$ContentPlaceHolderCMSEdit$CMSToolbar1$btnDelete','')">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过 WebDriver 对警报处理的支持仅在 Chrome 15 或 16 中实现(我不记得到底是哪一个)。这两个版本都尚未在稳定渠道上提供。您可以尝试切换到测试版或开发版频道,看看是否有效。
Support for alert handling via WebDriver was only implemented in either Chrome 15 or 16 (I can't remember exactly which). Neither version is yet available on the stable channel. You could try switching to the beta or dev channels and see if that works.