hound icon indicating copy to clipboard operation
hound copied to clipboard

Add retries argument to element? ?

Open taylorzr opened this issue 8 years ago • 1 comments

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

taylorzr avatar May 12 '17 20:05 taylorzr

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:

danhper avatar May 13 '17 13:05 danhper