Commands

Represents the set of commands available in a Browsertime script.

Classes

Commands

Members

action :Actions

Selenium's action sequence functionality.
Type:

addText :AddText

Provides functionality to add text to elements on a web page using various selectors.
Type:

android :AndroidCommand

Provides commands for interacting with an Android device.

bidi :Bidi

Use WebDriver Bidi. Availible in Firefox and in the future more browsers.
Type:

cache :Cache

Manages the browser's cache.
Type:

cdp :ChromeDevelopmentToolsProtocol

Use the Chrome DevTools Protocol, available in Chrome and Edge.

click :Click

Provides functionality to perform click actions on elements in a web page using various selectors.
Type:

debug :Debug

Provides debugging capabilities within a browser automation script. It allows setting breakpoints to pause script execution and inspect the current state.
Type:

element :Element

Get Selenium's WebElements.
Type:

error :function

Add a text that will be an error attached to the current page.
Type:
  • function
Example
await commands.error('My error message');

js :JavaScript

Executes JavaScript in the browser context.

markAsFailure :function

Mark this run as an failure. Add a message that explains the failure.
Type:
  • function
Example
await commands.markAsFailure('My failure message');

measure :Measure

Provides functionality for measuring a navigation.
Type:

meta :Meta

Adds metadata to the user journey.
Type:

mouse :Object

Interact with the page using the mouse.
Type:
  • Object
Navigates to a specified URL and handles additional setup for a page visit.
Type:
  • function
Example
await commands.navigate('https://www.example.org');
Provides functionality to control browser navigation such as back, forward, and refresh actions.

screenshot :Screenshot

Takes and manages screenshots.

scroll :Scroll

Provides functionality to control page scrolling in the browser.
Type:

select :Select

Interact with a select element.
Type:

set :Set

Sets values on HTML elements in the page.
Type:

stopWatch :StopWatch

Stopwatch utility for measuring time intervals.

switch :Switch

Switches context to different frames, windows, or tabs in the browser.
Type:

trace :ChromeTrace

Manages Chrome trace functionality, enabling custom profiling and trace collection in Chrome.

wait :Wait

Provides functionality to wait for different conditions in the browser.
Type: