You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 usefind_element(:xpath, ..., but is there a way to create a custom strategy type? For example:
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:
The text was updated successfully, but these errors were encountered: