开发者

Selenium - running javascript

i've got dumb question - how to run scripts located on tested site? I can run alert, but i don开发者_StackOverflow中文版t have access to scripts written by my. I've tried runscript, geteval - without any effect.


Since Selenium is written in JavaScript the window object moves to within the Selenium object.

What you need to do is

selenium.get_eval("this.browserbot.getUserWindow().youScriptOnThePage")

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜