开发者

Selenium2: Obtaining error details when using executeScript() fails

开发者 https://www.devze.com 2023-03-30 11:54 出处:网络
In order to deal with some bro开发者_Python百科wser peculiarities, I find myself needing to send javascript commands during tests.

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

精彩评论

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