1

I want to be able to find javascript errors on a web page during selenium testing, I am using selenium remotewebdriver, nunit and c#.

I was reading into a technique where you embed javascript into every page to check if there are any javascript errors present, and create a message using html to show that there is an error. This way, selenium can verify if there are any errors by checking if the message exists. But this way seems pretty tedious because you have to write the javascript code on every single page.

Can someone recommend me better way to implement this?

4

1 回答 1

0

另一种为许多人带来成功的方法是使用代理为您注入错误处理脚本。这具有额外的优势,您不必直接修改应用程序源代码。这种技术的一个例子可以在http://jimevansmusic.blogspot.com/2013/09/capturing-javascript-errors-in.html找到

于 2013-11-02T21:48:40.847 回答