getEval, you'll get an error because
getEval references Selenium Core's DOM, not the DOM of the AUT.
Fortunately the answer is simple. Use
this.browserbot.getCurrentWindow() to get a reference to the
window object in your DOM. Then you can execute any of the JS that lives in your page, right from Selenium!
This example uses the Ruby driver, but the principle is the same regardless of which language you use.
- # Assuming you have a global object named FOO, and you want to execute the method FOO.bar()
- # This does exactly the same thing as opening the Firebug console and executing window.FOO.bar()
You need to login to post a comment.