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

fix: allow for checking non-existent elements #1623

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

goosewobbler
Copy link
Contributor

@goosewobbler goosewobbler commented Aug 6, 2024

The wdio-electron-service DOM tests are failing on the non-existent element test. I traced the issue back to this line where an error is thrown when the target element does not exist.

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we apply this change to other matchers that call getElement?

@goosewobbler
Copy link
Contributor Author

Should we apply this change to other matchers that call getElement?

Good catch!

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may also resolve #1615

Great work, thanks 👍

@christian-bromann christian-bromann merged commit 3212c4f into webdriverio:v9 Aug 6, 2024
6 checks passed
@wdio-bot
Copy link
Contributor

wdio-bot commented Aug 6, 2024

Hey goosewobbler 👋

Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution. We've sent you an email with further instructions on how to claim your expenses from our development fund. Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at [email protected] or in the contributing channel on Discord.

We are looking forward to more contributions from you in the future 🙌

Have a nice day,
The WebdriverIO Team 🤖

christian-bromann pushed a commit that referenced this pull request Aug 15, 2024
* fix: allow for checking non-existent elements

* fix: support non-existent elements in matchers
christian-bromann added a commit that referenced this pull request Aug 15, 2024
* refactor: delete XXXContaining matchers (#1550)

* refactor: delete toHaveUrlContaining

* refactor: delete toHaveTitleContaining

* refactor: delete toHaveClipboardTextContaining

* refactor: delete toHaveAttributeContaining

* refactor: delete toHaveElementClassContaining

* refactor: delete toHaveValueContaining

* refactor: delete toHaveComputedLabelContaining

* refactor: delete toHaveComputedRoleContaining

* refactor: delete toHaveHrefContaining

* refactor: delete toHaveLinkContaining

* refactor: delete toHaveTextContaining

* refactor: delete toHaveHTMLContaining

* docs: add stringContaining examples

---------

Co-authored-by: Christian Bromann <[email protected]>

* fixes after rebase

* upgrade WebdriverIO to v9

* lower treshold as we punted on the body payload coverage

* ci: update release pipeline

* update version after failed release

* Release 5.0.0-alpha.1

* fix peer deps

* Release 5.0.0-alpha.2

* fix: allow for checking non-existent elements (#1623)

* fix: allow for checking non-existent elements

* fix: support non-existent elements in matchers

* update deps

* fix build

---------

Co-authored-by: goosewobbler <[email protected]>
Co-authored-by: WebdriverIO Release Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants