Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Add logic to solve the problem with the temporary inability to interact with the element. #4727

Closed
@niyarlatotep

Description

@niyarlatotep

Feature Request
Add logic for handle with modal windows and elements not attached to the DOM.

  1. Add retry logic, for actions with elements, like click, with parameters (how many times and timeout) and/or add some expected condition which will check if element is clickable (expect if other element wouldn’t get click);
  • Reasons for adopting new feature
    Sometimes tests fail because of modal window that appears and disappears (for example after deleting an object). While exists modal window click other element will fail, and we can't handle modal window disappearing moment. The same problem with moving element (with css animation) if we have retry or expected condition it could be resolved. A similar problem with element that not attached to the DOM, from moment of element finding and action.

There’s two ways for resolving this issue

  1. Add some browser.sleep, but if modal window exists time increase it will fail and if sleep time long, test will slow.
  2. Add retry logic, retry(elem.click, howManyTimes, timeout).
    Could be cool to have “retry” functionality by default, and one common config for it (by default there could be zero retries there), and may be some custom parameters passed in method: elem.click(howManyTimes, timeout)
  • Is this a breaking change? (How will this affect existing functionality)
    Don't know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions