-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
unhandledRejection using findElement chained to find #4192
Comments
This is actually a known issue where the test run ends abruptly on But for your particular examples, it will be handled correctly by Nightwatch if you move the const billingCard = locateWith(By.css(`body`));
const headerElement = await browser.element.find(billingCard).findElement(
By.css('[this="doesntExist"]')
); Explanation for above: When you do Now, if you do But if you call the |
Description of the bug/issue
I have an async page object command that returns an object containing Definition(s). Those definitions are found by chaining using syntax like
If billingCard is present in the DOM, but the selector in the chained findElement does not, when I run the test I get an unhandledRejection and Nightwatch exits unexpectedly without finishing out the test and closing the browser.
Steps to reproduce
npx nightwatch nightwatch\test\google.ts
Sample test
Command to run
Verbose Output
Nightwatch Configuration
Nightwatch.js Version
3.6.0
Node Version
21.6.2
Browser
Chrome 123
Operating System
Windows 11
Additional Information
nightwatchUnhandled.zip
The text was updated successfully, but these errors were encountered: