Open sn3p opened 7 years ago
Hi, thanks for the proposal and sorry for the delay. I agree custom strategies could be helpful, but I do not have time to take care of it right now. If you would like to try implementing it, please feel free to send a PR. Thank you very much.
We just released the first version of test_selector, a set of helpers to set/get test selectors to/from elements in a Phoenix app (when
env == :test
). These selectors are hashed (scoped to the view module they are used in) for accurate selection and "leakage" prevention. See our Wiki for examples. The reason we created this is we prefer reserving classes for styling, and id's have limitations because they have to be unique.My question:
Our test helpers currently use
find_element(:xpath, ...
, but is there a way to create a custom strategy type? For example:I tried:
But this results in an error: