有没有办法自动在 firefox/IE 中抛出 javascript 错误
我们可以捕获/自动化点击时浏览器中抛出的js错误吗页面。是否可以用硒捕获(据我所知,我认为不行!)
Possible Duplicate:
capturing javascript error in selenium
can we capture/automate the js errors thrown in browser while clicking the page .Is it possible to capture with selenium (as far my knowledge i think no!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,我会再次在这里重新发布。您可以通过处理
window.onerror
事件来做到这一点。请参阅以下链接 http: //www.silverwareconsulting.com/index.cfm/2010/6/7/Checking-for-JavaScript-Errors-with-Selenium。但无论如何,这个问题可能与这个问题重复。Well I'll repost it here again. You can do it by handling
window.onerror
event. See the following link http://www.silverwareconsulting.com/index.cfm/2010/6/7/Checking-for-JavaScript-Errors-with-Selenium. But anyway, this question is possibly duplicate with this one.您可以使用 Selenium 检测 JavaScript 错误。以下博客将对您有很大帮助 http://incodewetrustinc.blogspot .com/2008/06/detecting-javascript-errors-with.html
You can detect JavaScript error using Selenium. Following blog will be great help to you http://incodewetrustinc.blogspot.com/2008/06/detecting-javascript-errors-with.html