Step Definitions
This page provides an overview of available step definitions in TestFlowKit. For a complete, searchable dictionary of all steps, visit the Step Definitions Browser.
Categories
TestFlowKit provides step definitions organized by category:
Navigation Steps
Steps for navigating between pages and URLs.
Given the user goes to the "page_name" page
Given the user navigates to "https://example.com"
When the user refreshes the page
When the user goes back
When the user goes forward
Form Interaction Steps
Steps for interacting with form elements.
When the user enters "text" into the "field_name" field
When the user clears the "field_name" field
When the user selects "option" from the "dropdown_name" dropdown
When the user checks the "checkbox_name" checkbox
When the user unchecks the "checkbox_name" checkbox
Click Steps
Steps for clicking elements.
When the user clicks the "element_name" button
When the user clicks the "element_name" link
When the user clicks the "element_name" element
When the user double-clicks the "element_name" element
When the user right-clicks the "element_name" element
Mouse Steps
Steps for mouse interactions.
When the user hovers over the "element_name" element
When the user drags the "source" element to the "target" element
When the user scrolls to the "element_name" element
Keyboard Steps
Steps for keyboard interactions.
When the user presses the "Enter" key
When the user presses "Control+A"
When the user types "text to type"
Assertion Steps
Steps for verifying page state.
Then the "element_name" should be visible
Then the "element_name" should not be visible
Then the "element_name" should contain "text"
Then the "element_name" should not contain "text"
Then the page title should be "Title"
Then the page title should contain "Partial Title"
Then the current URL should be "https://example.com"
Then the current URL should contain "/path"
Then the "element_name" should be enabled
Then the "element_name" should be disabled
Then there should be 5 "element_name" elements
Wait Steps
Steps for waiting.
When the user waits for 2 seconds
When the user waits for the "element_name" to be visible
When the user waits for the "element_name" to disappear
Variable Steps
Steps for working with variables.
When I store the "value" into "variable_name" variable
When I store the content of "element_name" into "variable_name" variable
When I store the JSON path "$.data.id" from the response into "variable_name" variable
When I save the response path "$.token" as global variable "token_name"
When I store the value "value" into global variable "variable_name"
REST API Steps
Steps for REST API testing.
Given I prepare a request for the "endpoint_name" endpoint
And I set the request body to:
"""
{"key": "value"}
"""
And I set the following path parameters:
| param | value |
And I set the following query parameters:
| param | value |
And I set the request header "Header-Name" to "value"
When I send the request
Then the response status code should be 200
Then the response should contain "text"
Then the response JSON path "$.data.id" should be "123"
Then the response JSON path "$.data.field" should exist
Then the response time should be less than 1000 milliseconds
GraphQL Steps
Steps for GraphQL API testing.
Given I prepare a request for the "query_name" query
And I set the GraphQL variables to:
"""
{"id": "123"}
"""
When I send the GraphQL request
Then the response JSON path "data.user.name" should be "John"
Visual Steps
Steps for visual testing.
When I take a screenshot
When I take a screenshot named "page_state"
When I capture a visual snapshot of "component_name"
Then the "component_name" should match the visual baseline
Step Definition Browser
For the complete, searchable list of all step definitions with examples and parameters, use the interactive Step Definitions Browser.
The browser allows you to:
- Search by keyword
- Filter by category
- View parameter types
- Copy step syntax
Custom Step Patterns
String Parameters
Enclosed in quotes, replaced with actual values:
When the user enters "john@example.com" into the "email" field
# ^^^^^^^^^^^^^^^^^^ ^^^^^^^
# string parameter string parameter
Table Parameters
Structured data passed to steps:
And I set the following path parameters:
| userId | 123 |
| commentId | 456 |
Doc String Parameters
Multi-line text content:
And I set the request body to:
"""
{
"name": "John",
"email": "john@example.com"
}
"""
Next Steps
- Step Definitions Browser — Interactive step browser
- Variables — Using variables in steps
- Configuration — Element and endpoint configuration