Skip to content

Add retries option to the search and find functions #12

Description

@sn3p

Just like Hound's find_element/3 I'd like to add the retries option:

def find_test_element(view_module, retries \\ 5)
def search_test_element(view_module, retries \\ 5)

By default Hound retries 5 times. But when I want to make sure a page is lacking an element, I might want to check only once:

assert search_test_element(UserView, "does-not-exist", 1) == {:error, :no_such_element}

Multiple retries significantly increases the testing duration.

Looks like adding an optional attribute will conflict in our function arity, so need to find a workaround.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions