hound
hound copied to clipboard
Add retries argument to element? ?
The element? function uses find_all_elements, but doesn't provide a way to pass the number of retries along. Is there any reason for element? not taking retries as an argument?
I could potential create a PR to add this functionality. E.g.
element?(:css, ".some-class", 42)
Current function signatures:
-
element?(Hound.Element.strategy, String.t) :: boolean -
find_all_elements(atom, String.t, non_neg_integer) :: list
[1] https://hexdocs.pm/hound/Hound.Matchers.html#element?/2 [2] https://hexdocs.pm/hound/Hound.Helpers.Page.html#find_all_elements/3
There is no particular reason not to accept a retry number here, so if you would like to send a PR for this, I will be glad to merge it. Thank you :smiley: