开发者

Selenium - running javascript

开发者 https://www.devze.com 2023-01-30 06:16 出处:网络
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 - withou

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

精彩评论

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