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

should we make entity.execute_script(js) to return self? especially on element? #514

Open
yashaka opened this issue Feb 20, 2024 · 0 comments

Comments

@yashaka
Copy link
Owner

yashaka commented Feb 20, 2024

and for returning script result use entity.get(query.execute_script(...)) ?

then, something like this:

browser.open('https://demoqa.com/links')
link = browser.element('#simpleLink')
link.execute_script('element.target = "_self"')
link.click()

can be written in one line:

browser.open('https://demoqa.com/links')
browser.element('#simpleLink').execute_script('element.target = "_self"').click()
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

1 participant