UNPKG

artes

Version:

The simplest way to automate UI and API tests using Cucumber-style steps.

270 lines (213 loc) 9.99 kB
# Step Definitions ## Table of Contents - [Mouse Actions](#mouse-actions) - [Keyboard Actions](#keyboard-actions) - [Page Actions](#page-actions) - [Frame Actions](#frame-actions) - [Assertions](#assertions) --- ## Mouse Actions ### Click Actions - User clicks `{string}` - User clicks `{string}` with force - User clicks `{string}` at `{int}, {int}` position - User clicks `{string}` at `{int}, {int}` position with force - User clicks at `{int}, {int}` coordinates - User clicks at `{int}, {int}` coordinates with click count `{int}` and delay `{int}` - User clicks at `{int}, {int}` coordinates with force - User clicks `{string}` with button `{string}` - User clicks `{string}` with button `{string}` and force ### Double Click Actions - User double clicks `{string}` - User double clicks `{string}` with force - User double clicks `{string}` at `{int}, {int}` position - User double clicks `{string}` at `{int}, {int}` position with force - User double clicks at `{int}, {int}` coordinates - User double clicks at `{int}, {int}` coordinates with click count `{int}` and delay `{int}` - User double clicks at `{int}, {int}` coordinates with force ### Mouse Movement Actions - User moves to `{int}, {int}` coordinates - User scrolls the mouse wheel at `{int}, {int}` coordinates ### Hover Actions - User hovers over `{string}` - User hovers over `{string}` with force - User hovers over `{string}` at `{int}, {int}` position - User hovers over `{string}` at `{int}, {int}` position with force ### Focus Actions - User focuses on `{string}` - User focuses on `{string}` with force - User focuses on `{string}` at `{int}, {int}` position - User focuses on `{string}` at `{int}, {int}` position with force ### Drag Actions - User drags `{string}` to `{string}` - User drags `{string}` to `{int}, {int}` position ### Selection Actions - User selects by value `{string}` from `{string}` - User selects by text `{string}` from `{string}` ### Checkbox Actions - User checks `{string}` - User unchecks `{string}` ### Scroll Actions - User scrolls into view for `{string}` --- ## Keyboard Actions ### Press Actions - User presses `{string} on {string}` - User presses keys `{string}` sequentially on `{string}` - User presses keys `{string}` sequentially with delay `{int} on {string}` ### Input Actions - User types `{string}` in `{string}` - User types `{string}` with delay `{int}` - User inserts text `{string}` - User clears `{string}` ### Selection Actions - User selects text in `{string}` ### File Input Actions - User sets input files `{string}` for `{string}` ### Key State Actions - User holds down `{string}` - User releases `{string}` - User presses `{string}` --- ## Page Actions ### Navigation Actions - User navigates to `{string}` page - User navigates previous page - User navigates next page ### URL Actions - User gets URL of page ### Wait Actions - User waits `{int}` seconds - User waits `{int}` milliseconds - User waits `{int}` minutes --- ## Frame Actions ### Screenshot Actions - User takes a screenshot of `{string}` ### Content and Locator Actions - User gets the content frame of `{string}` - User gets the frame locator of `{string}` ### Element Retrieval Actions - User gets the `{int}th` element of `{string}` - User gets the first element of `{string}` - User gets the last element of `{string}` - User filters elements of `{string}` with filter `{string}` ### Counting Actions - User counts the elements of `{string}` ### Accessibility-Based Retrieval Actions - User gets the element with alt text `{string}` - User gets the element with label `{string}` - User gets the element with placeholder `{string}` - User gets the element with role `{string}` - User gets the element with testI `{string}` - User gets the element with testII `{string}` ## Assertions - User expects `{string}` should be attached - User expects `{string}` should be checked - User expects `{string}` should be disabled - User expects `{string}` should be editable - User expects `{string}` should be empty - User expects `{string}` should be enabled - User expects `{string}` should be focused - User expects `{string}` should be hidden - User expects `{string}` should be on the screen - User expects `{string}` should be visible - User expects `{string}` should have `{string}` text - User expects `{string}` should have `{string}` description - User expects `{string}` should have `{string}` name - User expects `{string}` should have `{string}` attribute with `{string}` value - User expects `{string}` should have `{string}` class - User expects `{string}` should have `{int}` count - User expects `{string}` should have `{string}` CSS property with `{string}` value - User expects `{string}` should have `{string}` id - User expects `{string}` should have `{string}` JavaScript property with `{string}` value - User expects `{string}` should have `{string}` role - User expects `{string}` should have a screenshot - User expects `{string}` should match `{string}` text - User expects `{string}` should have `{string}` value - User expects `{string}` should have `{string}` values - User expects `{string}` should not be attached - User expects `{string}` should not be checked - User expects `{string}` should not be disabled - User expects `{string}` should not be editable - User expects `{string}` should not be empty - User expects `{string}` should not be enabled - User expects `{string}` should not be focused - User expects `{string}` should not be hidden - User expects `{string}` should not be on screen - User expects `{string}` should not be visible - User expects `{string}` should not have `{string}` text - User expects `{string}` should not have `{string}` description - User expects `{string}` should not have `{string}` name - User expects `{string}` should not have `{string}` attribute with `{string}` value - User expects `{string}` should not have `{string}` class - User expects count of `{string}` should not be `{int}` - User expects `{string}` should not have `{string}` CSS property with `{string}` value - User expects `{string}` should not have `{string}` id - User expects `{string}` should not have `{string}` JavaScript property with `{string}` value - User expects `{string}` should not have `{string}` role - User expects `{string}` should not match `{string}` text - User expects `{string}` should not have `{string}` value - User expects `{string}` should not have `{string}` values - User expects the page should not have a screenshot - User expects the page should not have `{string}` title - User expects the page url should not be `{string}` - User is not on `{string}` page - The response should not be OK - User expects `{string}` should be `{string}` text - User expects `{string}` should be close to `{float}` with precision `{int}` - User expects `{string}` should be defined - User expects `{string}` should be falsy - User expects `{string}` should be greater than `{float}` - User expects `{string}` should be greater than or equal to `{float}` - User expects `{string}` should be an instance of `{string}` - User expects `{string}` should be less than `{float}` - User expects `{string}` should be less than or equal to `{float}` - User expects `{string}` should be NaN - User expects `{string}` should be null - User expects `{string}` should be truthy - User expects `{string}` should be undefined - User expects `{string}` should have `{string}` substring - User expects `{string}` should contain equal `{string}` - User expects `{string}` should equal `{int}` - User expects length of `{string}` should be `{int}` - User expects `{string}` should have `{string}` property - User expects `{string}` should match `{string}` regex - User expects `{string}` should match `{string}` object - User expects `{string}` should strictly equal `{string}` - The function should throw - User expects `{string}` should be any instance of `{string}` - User expects `{string}` may be anything - User expects `{string}` should contain `{string}` array elements - User expects `{string}` should be close to `{float}` with precision `{int}` - User expects `{string}` should contain `{string}` object properties - User expects `{string}` should have `{string}` substring - User expects `{string}` should match `{string}` regex - User expects `{string}` should not have `{string}` text - User expects `{string}` should not be close to `{float}` with precision `{int}` - User expects `{string}` should not be defined - User expects `{string}` should not be falsy - User expects `{string}` should not be greater than `{float}` - User expects `{string}` should not be greater than or equal to `{float}` - User expects `{string}` should not be instance of `{string}` - User expects `{string}` should not be less than `{float}` - User expects `{string}` should not be less than or equal to `{float}` - User expects `{string}` should not be NaN - User expects `{string}` should not be null - User expects `{string}` should not be truthy - User expects `{string}` should not be undefined - User expects `{string}` should not have `{string}` substring - User expects `{string}` should not contain equal `{string}` - User expects `{string}` should not equal `{string}` - User expects length of `{string}` should not be `{int}` - User expects `{string}` should not have `{string}` property - User expects `{string}` should not match `{string}` regex - User expects `{string}` should not match `{string}` object - The function should not throw - User expects `{string}` should not be any instance of `{string}` - User expects `{string}` may not be anything - User expects `{string}` should not contain `{string}` array elements - User expects `{string}` should not be close to `{float}` with precision `{int}` - User expects `{string}` should not contain `{string}` object properties - User expects `{string}` should not contain `{string}` substring - User expects `{string}` should not match `{string}` regex