Skip to content

[Feature Request]: Add Timeout Value to click() Events #274

@EthanC

Description

@EthanC

Checklist before requesting

  • I have searched for similar feature requests and didn't find a duplicate.
  • I have checked the documentation to confirm this feature doesn't already exist.

Problem Statement

Much like the .find() function, it would be great to have an optional timeout argument added to the .click() function. Such a value would prevent ElementNotVisible Exceptions that are caused by pages which animate-in or move content.

Proposed Solution

I would like to see an optional keyword argument added to the .click() function, like so:

# This will wait 5s for the WebElement to become visible before it raises an Exception
WebElement(...).click(timeout=5)

Alternatives Considered

Currently, this functionality can be emulated using while not WebElement().is_visible(), but this requires repetitive boilerplate that reduces code quality.

Additional Context

No response

Importance

Nice to have

Contribution

No, I don't have the capacity to implement this

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions