opentest
opentest copied to clipboard
How to access the driver using Java.type()?
If I want to do some direct interactions with the driver, how can I easily get it from within OpenTest script?
Actually, I think I found the solution:
Java.type("org.getopentest.selenium.core.SeleniumHelper").getDriver();
That's exactly what I was going to answer. :-) I don't know how you're planning to use the WebDriver instance from JavaScript, but if you're doing anything that's non-trivial you might want to create a custom OpenTest keyword instead (programmed in Java). See here for more details on that.