Skip to content

Commit

Permalink
add stack to error trace
Browse files Browse the repository at this point in the history
  • Loading branch information
mohit-nagaraj committed Dec 28, 2024
1 parent 44ba57c commit 9813e05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/api/web-element/scoped-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ function createNarrowedError({error, condition, timeout}) {
if (error.name === 'TimeoutError') {
const err = new Error(`Timed out while waiting for element "${condition}" to be present for ${timeout} milliseconds.`);
err.name = 'NoSuchElementError';
err.stack = error.stack;

return err;
}
Expand Down

0 comments on commit 9813e05

Please sign in to comment.