wallaby
wallaby copied to clipboard
xpath selectors need to use exact text for label fields.
This is based on #257. Currently our xpath selectors for label text use contains(#{actual_text}). This can lead to "Multiple Element Errors" if 2 different fields have similar label texts. I think it would be good to match against the exact label text for an element instead of using contains(). This change would require users to use a fully qualified label text but, anecdotally, thats all I've ever seen anyone do in practice anyway.
@keathley what about this issue? I'm facing exactly the issue as @jeffdeville in my application (Password and Password confirmation) and I'm looking for a solution.
For now you should be able to use the id of the element like text_field("password") and text_field("password_confirmation").
Thank you @keathley it is working 👍 but still do you have an idea when this could be addressed?
I'll try to prioritize this fix.