-
Notifications
You must be signed in to change notification settings - Fork 8
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
API Inconsistency: find! vs find_by! #20
Comments
Hm, interesting point. The Although generally I like to follow the capybara pattern of:
So that (1) makes sure we have page content and asserts the context of the test. That way I don't get confused about broken tests as often. But yeah I agree that I'm not sure how to remedy this exactly! |
Well yeah, but sometimes you already are on the correct page but still have to wait for stuff to appear (i.e. ajax). |
Yup. Would be nice if |
This also seems to be the way capybara implements waiting. Still, it somehow feels like re-implementing capybara features in domino. |
Capybara used to expose a wait function but too many people used it so they
|
Hi,
I just noticed the addition of the
find_by!
method in #19. From my point of view, this introduces an unfortunate semantic inconsistency with thefind!
method added earlier in #14.When using a JS Capybara driver:
find!
waits for elements to appearfind_by!
simply raises an exception if the element is not already on the pageAs mentioned in #15, I am not sure how the waiting behavior could be added to
find_by!
in the presence of computed attributes. As a last resort one could consider renamingfind!
to something likeawait
. Still this would require a breaking API change.The text was updated successfully, but these errors were encountered: