English
Given
I set viewport to preset {string}
Sets the viewport dimensions with one of the presets defined by your runtime engine as Cypress: Link or Playwright: Link
I set viewport with width {int} and height {int}
Sets the viewport dimensions to the specified width and length
I start a keyboard navigation from the top of the page
Start a keyboard navigation session from the top of the page
Examples
When
I click
Triggers a click on the selected element.
Make sure you've selected an element beforehand with the within... phrases.
I click on element with role {string} and name {string}
Triggers a click on the element with given role and specific name
I set header(s) for uri {string} and method {string}
Sets one or more headers to the indicated http request and only for the Http method (GET / POST / etc...) passed as a argument. If you use Playwright as execution engine, method isn't used.
I set header(s) for uri {string}
Sets one or more headers to the indicated http request
I reset context
Deletes selected element and timeout
I set timeout with value {int}
Sets the timeout value (in millisecond) for finding element in the DOM
⚠ remember to deselect the element with I reset context if you're no longer acting on it
I type the sentence {string}
Writes the sentence passed as a parameter (useful for example to fill in a form field).
Make sure you've selected an element beforehand with the within... phrases.
I enter the value {string}
Writes the sentence passed as a parameter (useful for example to fill in a form field).
Make sure you've selected an element beforehand with the within... phrases.
I press {string}
Press specified key:
Key Description {tab} Tabulation {reverseTab} Reverse tabulation {down} Arrow Down {right} Arrow Right {left} Arrow Left {up} Arrow Up
Make sure you've selected an element beforehand with the within... phrases.
I press {int} times on {string}
Press specified key multiple times using | as: num|{key}
I go to next keyboard element
Move to the next html element that can be reached with Tab
Examples
I go to previous keyboard element
Move to the previous html element that can be reached with back Tab
Examples
I visit path {string}
Navigate to the Uri passed as a argument (full url consisting of the BASE_URL + Uri) or navigate to Url if begin with http:// or https://
within the element with aria-label {string}
Selects the element whose aria-label is specified
⚠ remember to deselect the element with I reset context if you're no longer acting on it
within the element with selector {string}
Selects the element whose selector is specified
⚠ remember to deselect the element with I reset context if you're no longer acting on it
within the element with role {string} and name {string}
Selects the element whose accessible role and accessible name are specified
⚠ remember to deselect the element with I reset context if you're no longer acting on it
within the element with testId {string}
Selects the element whose data-testId attribute is specified
⚠ remember to deselect the element with I reset context if you're no longer acting on it
I mock a request {} on url {string} named {string} with content {}
Mock a named API response with body. If you use Playwright as runtime engine, request and named are unused.
I mock a request {} on url {string} named {string} with fixture {}
Mock a named API response with file's extension .json, .js, .coffee, .html, .txt, .csv, .png, .jpg, .jpeg, .gif, .tif, .tiff, .zip
I mock a request {} on url {string} named {string} with status code {int}
Mock a named API response with status code
Then
I should see these attributes with values
Checks Html attributes of the selected element
I should see an element with aria-label {string} and content {string}
Checks that an Html element exists with the specified aria-label attribute and content
I should see an element with aria-label {string}
Checks that an Html element exists with the specified aria-label attribute
I should see an element with content {string}
Checks that an Html element exists with the specified content
I should see an element with selector {string}
Checks that an Html element exists with the specified selector