Skip to content

Not all locator APIs currently retry #5174

Description

@ankur22

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.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions