09.
The fun stuff Chapter
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
4 Comments
http://extensions.behat.org... href for Behatch Contexts is dead
Thanks for the head's up Michael! I've just updated them at https://github.com/knpunive...
Cheers!
Hi there,
I'm using Behat with Symfony. Sometimes after metastep "When i follow..." or "When i press button..." the test fails try to get status message. For instance:
Scenario: Delete any maintenance
Given I am deleting any maintenance
When I press "Delete"
Then I should see "Maintenance deleted."
When i'm running this sometimes works sometimes fails and the return is: Button with id|name|title|alt|value "Delete" not found.
Can you guys help me out? It's appear to be a session issue.
Tks.
Hey Matheus!
Are you using any JavaScript or AJAX in this scenario? The most likely cause of "phantom failures" is that Mink isn't waiting. For example, if "Given I am deleting any maintenance" opens a modal, then *sometimes* it might open fast enough for the Delete button to be visible, but sometimes it might open too slowly. Is this possibly the cause? If so, check out https://knpuniversity.com/s.... I'd try adding a big timeout (like 5 or 10 seconds) and see if the odd behavior stops. If it does, you'll know this is the cause.
Cheers!
"Houston: no signs of life"
Start the conversation!