-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(browser): add findElement and enable strict mode in webdriverio and preview
#9677
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
Merged
sheremet-va
merged 17 commits into
vitest-dev:main
from
sheremet-va:fix/await-webdriverio-element
Feb 20, 2026
Merged
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
edff90a
fix(browser): enable strict mode in webdriverio and preview
sheremet-va 49cc4fb
fix: allow timeout option in every interactive action
sheremet-va d56a4f2
chore: update types
sheremet-va 00c382c
feat: add `strict` option
sheremet-va 4b2c3cd
chore: cleanup
sheremet-va dab7b31
test: add tests for strict error
sheremet-va b1597c2
fix: ensure awaited
sheremet-va ca6e7a4
feat: expose waitForElement
sheremet-va 2e0731d
fix: make async into sync
sheremet-va 209dcd1
chore: cleanup
sheremet-va c09fd70
fix: provide options to `convertToSelector`
sheremet-va 9915f3e
chore: fix types
sheremet-va d598c4e
test: add `waitForElement` tests
sheremet-va fbdfe9f
docs: clarify
sheremet-va 46f8f6d
chore: make check more stable on CI
sheremet-va 910fea7
chore: hm
sheremet-va a855e9b
refactor: rename to `findElement`
sheremet-va File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean? I'm not sure what "library", "3rd-party API", nor "not supporting locators" mean.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is causing confusion? Library is any code that works in the browser, like jquery or any UI library, the same for 3d party APIs, like vue's
createApp, for example - it accepts an HTML element, but doesn't support a locator directlyThis section tries to say that you should not use this API directly, it is exposed for developers that build things on top of Vitest, or if the external API doesn't accept locator at all, like jquery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I clarified the sentence, does it sound better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I understood better. I wasn't looking at the return value
HTMLElement | SVGElementat all, but simply thinking as playwright'stoBeAttachedorlocator.waitForAPI (which is void-returning).Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it should be renamed to
find()instead then? OrfindElement()(similar to how testing-library names things)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findElementsounds good 👍