Web Recording Options

CukeTest provides Web recording functionality, allowing you to finely control the recording process by adjusting the following options, thereby generating automated scripts that meet specific requirements.

Web Settings Options

Browser

You can select the type of browser to use for recording. Depending on your operating system and installed browsers, the available options may vary:

  • On Windows, supported browsers include Chrome, Microsoft Edge, and Firefox.
  • On Linux, supported browsers include Loongson Browser, QiAnXin Browser, and Chrome.

For Firefox, CukeTest will use the built-in Firefox for recording. Other browsers, such as Chrome, will by default use the latest version installed on your system.

If the browser you need is not listed, you can still use any locally installed Chromium-based browser. Simply click Select Browser… and specify the executable path of the browser in the file dialog.

Additionally, you can choose to record Electron applications. After selecting this, relevant options will change. For details, please refer to Electron Recording Options.

Starting URL

Set the URL that the browser will automatically open at the start of recording. If left blank, a new empty tab will open, and you can manually enter the URL to begin recording.

Recording Parameters

Here you can add command-line arguments to customize the browser environment when launching it. For example, the viewport-size parameter sets the browser viewport size. The default value is 1280,720, meaning the content will display in a 1280x720 viewport, with overflow requiring scrolling. The table below explains each option and its parameters; quotation marks are not required when setting them.

Option Example Description
color-scheme dark Simulates the system preferred color theme. Options are light or dark.
geolocation 43.5,124.8 Sets the geographical coordinates (latitude, longitude) for testing location-dependent features.
lang zh-CN Sets the browser language and region, e.g., en-US or zh-CN.
proxy-server http://myproxy:3128 Sets a proxy server for the browser, supporting http and socks5 protocols.
timezone Asia/Shanghai Sets a simulated timezone, e.g., Europe/Rome.
timeout 30000 Sets the default operation timeout in milliseconds, default is 20000.
viewport-size 1920,1080 Sets the initial browser viewport size (width, height) in pixels. Useful for testing responsive layouts at different resolutions.
user-agent Your custom UA string Customizes the browser's User-Agent string.
user-data-dir C:\my-chrome-profile Specifies the user data directory (stores cookies, login state, etc.) to support “login-free” recording: log in manually during the first recording, and subsequent recordings using the same directory will automatically maintain login status.

Slow Motion

Enabling this option adds a fixed delay between each step during playback or script execution. This is particularly useful for pages with dynamic content or when you want to observe script execution details during debugging.

Once enabled, the generated code will include a default setting of slowMo: 1000, meaning a 1-second interval between each operation.

JavaScript
Python
const browser = await chromium.launch({
    headless: false,
    slowMo: 1000
});
browser = webauto.chromium.launch(headless=False, slow_mo=1000)