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

suppressNotFoundErrors in new Element API suppress other errors as well. #4223

Open
garg3133 opened this issue Jun 24, 2024 · 0 comments
Open

Comments

@garg3133
Copy link
Member

Description of the bug/issue

suppressNotFoundErrors property in the new Element API should ideally only suppress the NoSuchElementError but instead it suppresses all the errors that the WebDriver encounters and returns while trying to find the element.

For example, it also suppresses the InvalidSelectorError, which is thrown when the selector passed to the find() command is invalid, which could be a human error while writing the test.

Steps to reproduce

In any test, run the following command:

await browser.element.find({selector: '@something', suppressNotFoundErrors: true});

The above command will suppress and not throw any error even though the error is InvalidSelectorError and not NoSuchElementError.

Sample test

No response

Command to run

No response

Verbose Output

No response

Nightwatch Configuration

No response

Nightwatch.js Version

latest

Node Version

No response

Browser

No response

Operating System

No response

Additional Information

No response

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