Skip to content

Commit

Permalink
fix(webdriverio): improve stale element detection
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Apr 9, 2024
1 parent 2681b07 commit 73aa7b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/webdriverio/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ export function isStaleElementError (err: Error) {
// Firefox
err.message.includes('is no longer attached to the DOM') ||
// Safari
err.message.includes('Stale element found')
err.message.toLowerCase().includes('stale element found') ||
// Chrome through JS execution
err.message.includes('stale element not found in the current frame')
)
}

Expand Down

0 comments on commit 73aa7b9

Please sign in to comment.