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

add element.get(its.executeScript(...)) and element.perform(its.executeScript(...)) #115

Open
alex-popov-tech opened this issue Nov 15, 2019 · 0 comments

Comments

@alex-popov-tech
Copy link
Collaborator

The idea is to get rid of element.executeScript from the api to make it shorter, and at the same time be able to add its.executeScript to use when you want to execute script as an command, or a query inside a promise chain. Also as a benefit, we wrap passed script into an annon function, and at the same time implicitly pass there
Example:

const value = await element.should(be.visible).then(get.executeScript('element.value'))
const myhref = await element.should(have.attribute('href'))
  .then(perform.executeScript('element.value = arguments[0]', 'mynewhref')
  .then(get.attribute('href'))
@alex-popov-tech alex-popov-tech self-assigned this Nov 15, 2019
@alex-popov-tech alex-popov-tech removed their assignment Jul 18, 2023
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