[ftr/WebElementWrapper] workaround for chromedriver incorrect error response (#163231)

Related to #156821

It seems like Chromedriver 115 has regression again: sometimes it
returns NoSuchElementError instead of StaleElementReferenceError.
[chromedriver/issues#534](https://bugs.chromium.org/p/chromedriver/issues/detail?id=4534)

The fix on our side is by adding error message to retry list. The list
references the errors we would like to retry command on. It only work
for single element search where we store locator.
E.g. it will help with retrying on

```
await testSubjects.click('...');
```

but still fail when you do

```
const elements = await testSubjects.findAll('...');
await elements[1].click();
```

For viz tests stability I suggest reviewing #161202
This commit is contained in:
Dzmitry Lemechko 2023-08-07 12:32:02 +02:00 committed by GitHub
parent c4557ddc43
commit 585d108db7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,6 +31,7 @@ const RETRY_ON_ERRORS = [
'ElementNotInteractableError',
'StaleElementReferenceError',
'WebDriverError',
'NoSuchElementError', // https://bugs.chromium.org/p/chromedriver/issues/detail?id=4534
];
export class WebElementWrapper {