Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access the driver using Java.type()? #607

Open
TripleG opened this issue Feb 7, 2023 · 2 comments
Open

How to access the driver using Java.type()? #607

TripleG opened this issue Feb 7, 2023 · 2 comments

Comments

@TripleG
Copy link

TripleG commented Feb 7, 2023

If I want to do some direct interactions with the driver, how can I easily get it from within OpenTest script?

@TripleG
Copy link
Author

TripleG commented Feb 7, 2023

Actually, I think I found the solution:

Java.type("org.getopentest.selenium.core.SeleniumHelper").getDriver();

@adrianth
Copy link
Contributor

adrianth commented Feb 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants