Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise error if there are multiple matches #16

Open
paulcsmith opened this issue May 26, 2018 · 0 comments
Open

Raise error if there are multiple matches #16

paulcsmith opened this issue May 26, 2018 · 0 comments
Labels
help wanted Additional expertise needed

Comments

@paulcsmith
Copy link
Member

paulcsmith commented May 26, 2018

Similar to AmbiguousMatchError in Capybara

If you do click "@something" and there are 2 or more elements that match, raise LuckyFlow::AmbiguousMatchError

The error message should give pointers on what's going on and how to resolve it. For example:

There were X matches for "#{the_selector}" so LuckyFlow isn't sure which one you meant.

Try this...

  * Use a more specific selector: ".my-wrapper-element #{the_selector}"

Also, add a click_first method to just click the first one

@paulcsmith paulcsmith added the help wanted Additional expertise needed label Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Additional expertise needed
Projects
None yet
Development

No branches or pull requests

1 participant