Link

Step Definitions

kosher provides an extensive list of step definitions for controlling the browser, interacting with page elements, and validating the application’s behavior.

List of Step Definitions

Category Example Element Type
accessibility When I test the page for accessibility N/A
debugging When I take a screenshot N/A
debugging When I wait 10 seconds N/A
form When I fill in the following: text-based, radio, checkbox, select
form When I fill in “Name” with “my name” text-based, radio, checkbox, select
form When I fill in “Name” with: text-based
form When I key in “22031” in the “Location” field text-based
form When I select “Male” from “Sex” select
form When I check “Accept user agrement” checkbox
form When I uncheck “Send me letters” checkbox
form When I select the following values from “Filters”: Accepts Gherkin Table select
form When I unselect the following values from “Filters”: Accepts Gherkin Table select
form When I choose the “radio1” radio radio
form When I press/click “Submit” any
form When I press/click the 4th instance of “nextButton” any
form When I press/click the “Submit” button/link button, hyperlink
form When I unfocus/blur “first_name” any
form When I hover over “BidPlansMenu” any
form Then I enter today’s date in “Date” text-based
form verification Then I verify “date” has today’s date text-based
form verification Then “date” should contain today’s date text-based
form verification Then “Name” should contain “my name” text-based
form verification Then “Name” should contain: text-based
form verification Then “Name” should not contain “my name” text-based
form verification Then “Name” should not contain: text-based
form verification Then “states” should have the following options: select
form verification Then “states” should have the following options selected: select
form verification Then “states” should not have the following options selected: select
form verification Then the “Accept user agrement” checkbox should be checked checkbox
form verification Then the “Do not touch me” checkbox should not be checked checkbox
form verification Then the “radio 1” radio should be selected radio
form verification Then the “radio 2” radio should not be selected radio
navigation Given I am on the “home” page N/A
navigation When I go to the “other” page N/A
navigation When I follow “Privacy Policy” N/A
navigation verification Then I should be redirected to the “congratulations” page N/A
navigation verification Then I should be on the “congratulations” page N/A
browser When I maximize the window N/A
browser When I switch to the first/last window N/A
browser When I switch to frame 2 frame
browser When I accept the popup N/A
browser When I decline the popup N/A
browser When I switch to iframe 2 iframe
browser When I switch to the root frame N/A
browser When I enter “something” in the popup N/A
browser And I reload the page N/A
browser And I key “Hello, World.” in the active element N/A
browser verification Then I should see the popup text “Hello, World!” N/A
browser verification And I should not see the popup text “Hello, World!” N/A
verification And I should see “Great, you can click links!” N/A
verification And I should not see “some bla-bla” N/A
verification Then I should see all of the texts: N/A
verification Then I should see the following list: N/A
verification Then I should see the “Submit” button/link N/A
verification And I should not see the “Click Me” button/link N/A
verification Then I should see a link that points to “/about-us” N/A
verification And I should not see a link that points to “/contact-us” N/A
verification Then “Submit” should be disabled text-based, radio, checkbox, select, button
verification Then “Submit” should be enabled text-based, radio, checkbox, select, button
verification Then the 5th instance of “Page1PaginationLinks” should be disabled text-based, radio, checkbox, select, button
verification Then the 5th instance of “Page1PaginationLinks” should be enabled text-based, radio, checkbox, select, button
verification Then the “HomeCenterMessage” element should contain “Welcome to our site!” N/A
verification Then the “HomeCenterMessage” element should not contain “Hello, World.” N/A
verification Then the “GlyphiconHomeIcon” element should exist N/A
verification Then the “GlyphiconMailIcon” element should not exist N/A