Page Commands
Last updated
Was this helpful?
Last updated
Was this helpful?
Emulates given device metrics and user agent
Defines browser viewport, where the viewport is the user's visible area of a web page
Navigates to a given URL and waits until the page loaded
Makes a screenshot of the page
Emulates mouse click according to given options
Moves mouse to given position
Emulates tap according to given options
Emulates pressing on a key, optionally with modifiers such as ⇧, ⌥, alt, control, ⌘
Scrolls the document in the window by the given amount
Refreshes the page
Sets custom user agent
Sets cookies on the page
Intercepts to a given URL and replaces it according to provided data
Waits for a given time before proceeding to the next command
Waits until a given event before proceeding to the next command
Waits for HTTP(S) response
Waits for HTTP(S) request
Evaluates JavaScript code in the page context
Listen to dialog events and dismiss or accept dialogs (alert, beforeunload, confirm or prompt) as they are called
The step must be defined before the expected dialog event
Assigns template variable dynamically
Waits for an element matching a provided
Provide credentials for .
Runs custom JavaScript code in the test suite with use of and . You can access via ENV
map (e.g. ENV[VAR_NAME]
)
Stops execution of JavaScript, and calls (if available) the . During test scenarios may happen many things - DOM changes, pages load. It makes hard to figure out why some test assertions fail in some particular moment. You can use this tool to set a breakpoint. Test flow will stop as soon as it reaches this point. So you will be able to examine the page state with DevTools.
Polls URL
with a given intervals until a response satisfying parserFn
function received or a specified timeout exceeded. It can be used, for example, to retrieve a value from an