-
Notifications
You must be signed in to change notification settings - Fork 14
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
Your Mink example could use the WebAssert instead of assertNotNull after using find() #22
Comments
@stof Ah, I haven't used the I also hadn't seen the https://github.com/Behat/MinkExtension/blob/master/src/Behat/MinkExtension/Listener/FailureShowListener.php - that's also interesting. Thanks! |
Code changes merged and deployed in at #23. Only todo is to record a small addition to the |
WebAssert::elementExists
accepts the same arguments thanElement::find
(plus an optional third one if you want to search in specific element rather than the whole page), but it throws an ExpectationException when there is no node instead of returning null.There is a nice side-effect compared to using a PHPUnit assertion on the element: as the exception thrown is a MinkException, this will play well with the MinkExtension feature allowing to open the failing page on failure (to debug what failed by seeing the actual content)
The text was updated successfully, but these errors were encountered: