Skip to content

In TraversableElement->findField(), provide a way to find the first visible item rather than the first item. #311

Open
@alberto56

Description

@alberto56

TraversableElement->fillField(), clickLink(), etc., use findField(), findLink(), etc. to know what to click or fill.

Might it not be better to define new find functions which find only visible elements? For example, in addition to findLink(), a findVisibleLink() would cycle through all links and find the first visible one.

In turn, clickLink() would use findVisibleLink() rather than findLink() to know what to click.

Take the following use case: a website contains several links "xyz", but only one is visible at any given time. With the current method, if the first xyz is invisible, clickLink(xyz) fails. With the proposed method, the visible element could be clicked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions