Brief summary
While working on #5111 and #5163, I came to realise that locator APIs aren't retrying during specific errors -- when an element is not visible or when an element is not attached to the DOM.
Like we have done for the locator APIs that require a pointer such as click (#5111 and #5163), we need to add a retry mechanism for the other APIs, specifically for the ones that work with newAction.
Take a look at retryPointerAction and how it used in newPointerAction to understand a possible solution for newAction.
The affected locator APIs are:
- Locator
- BoundingBox
- Clear
- Fill
- Focus
- GetAttribute
- InnerHTML
- InnerText
- TextContent
- InputValue
- SelectOption
- Press
- PressSequentially
- Type
- DispatchEvent
- IsChecked
- IsEditable
- IsEnabled
- IsDisabled
- Evaluate
- EvaluateHandle
k6 version
NA
OS
NA
Docker version and image (if applicable)
NA
Steps to reproduce the problem
NA
Expected behaviour
Retry when an element is not visible or connected to the DOM until the timeout is reached.
Actual behaviour
Early exist with an error when the element is not visible or connected to the DOM.
Brief summary
While working on #5111 and #5163, I came to realise that
locatorAPIs aren't retrying during specific errors -- when an element is not visible or when an element is not attached to the DOM.Like we have done for the
locatorAPIs that require a pointer such asclick(#5111 and #5163), we need to add a retry mechanism for the other APIs, specifically for the ones that work with newAction.Take a look at retryPointerAction and how it used in newPointerAction to understand a possible solution for
newAction.The affected locator APIs are:
k6 version
NA
OS
NA
Docker version and image (if applicable)
NA
Steps to reproduce the problem
NA
Expected behaviour
Retry when an element is not visible or connected to the DOM until the timeout is reached.
Actual behaviour
Early exist with an error when the element is not visible or connected to the DOM.