Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Behat Mink reference
# Given
Given I am on [the] homepage
Given I am on "url"
# When
When I go to [the] homepage
When I go to "url"
When I reload the page
When I move backward one page
When I move forward one page
When I press "button"
When I follow "link"
When I fill in "field" with "value"
When I fill in "field" with:
long text
When I fill in "value" for "field"
When I fill in the following:
| field | value |
| name | Bob |
When I select "option" from "select"
When I additionally select "option" from "select"
When I check "option"
When I uncheck "option"
When I attach the file "path" to "field"
# Then
Then I should be on "url"
Then I should be on [the] homepage
Then the url should match "regex"
Then the response status code should [not] be 404
Then I should [not] see "text"
Then I should [not] see text matching "regex"
Then the response should [not] contain "text"
Then I should [not] see "text" in the "element" element
Then the "element" element should [not] contain "value"
Then I should [not] see a [an] "element" element
Then the "field" field should [not] contain "value"
Then the "checkbox" checkbox should be/should not be checked
Then the checkbox "checkbox" is/should be/should not be checked
Then I should see 5 "element" element[s]
Then print current URL # print to console
Then print last response # print to console
Then show last response # open in browser
Copy link

fer-ri commented Nov 4, 2015

Thanks a lot 💃


Copy link

bweston92 commented Mar 18, 2016

What about asserting values of form elements?

Copy link

yahyafakhroji commented Aug 10, 2016

Thanks bro 👍 🤘

Copy link

ronaldodrumond commented Feb 23, 2017

Obrigado! :) (Thank you)

Copy link

todomagichere commented Oct 2, 2017

Tnks! :)

Copy link

aturcey commented Nov 8, 2017

Thanks 👌

Copy link

chadyred commented Nov 23, 2017

All right, thanks a lot man ! 👍

Copy link

strawburrypokki commented Feb 15, 2018

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment