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

Consider wrapping waitForElement* methods into a single find() call #98

Open
KevinGrandon opened this issue May 12, 2016 · 0 comments
Open

Comments

@KevinGrandon
Copy link
Owner

KevinGrandon commented May 12, 2016

Multiple waitForElement* calls could be wrapped into a single find call. Currently the most common use case is to wait for an element to be in the DOM and visible, so optimize on find() handling that case.

E.g., all of these methods:

await findElement(selector)
await waitForElement(selector)
await waitForElementVisible(selector)
await waitForElementNotVisible(selector)

Could probably be transitioned into something like:

await find(selector, {checkVisible: false, checkPresent: false})
await find(selector, {checkVisible: false})
await find(selector)
await find(selector, {checkNotVisible: true})

Find signature:

async find(selector:String, options:{checkVisible:boolean=true, checkPresent:boolean=true, checkNotVisible:boolean=false})
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