开发者

Selenium2: Obtaining error details when using executeScript() fails

In order to deal with some bro开发者_Python百科wser peculiarities, I find myself needing to send javascript commands during tests.

Sometimes I get an error back from Selenium saying there was a javascript error but the server did not provide any details. Is there a way to get more information to see what's failing?

Mark


Depending on the browser you are executing your scripts on, you may be able to see the details in the JavaScript error console. For IE, this setting is inside Tools > Advanced > Display a notification about every script error. Even with this disabled, there should be an error icon in the lower left of the browser that, if clicked, should provide more information on the JavaScript error.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜