Skip to main content

Har Recording

Description

Start and stop capturing of HAR data during specific transactions for a cloud device. The capture starts when startHarRecording is executed. The capture stops when stopHarRecording is executed or the device is released.

info

Har recording cannot work in parallel with tunneling​.

Parameters

NameValueDescription
har fileStringThe full path of the requested file download destination.







In Appium Server (Appium Open Source) file unique name can be provided in the following format:



cloud:file_unique_name



For more information see Using the File Repository
filterStringOptional parameter. Filter for the content type.

If the filter is not given, the value will be according to cloud server configuration.

(See configuration for Cloud Admins on PCAP and HAR Support )

You can learn more about the filter here and here.

Usage

info

Replace <server> with the appropriate URL.

Example

Har file recording - using file repository

// File with unique name my_har_file must NOT exist in file repository
driver.executeScript("seetest:client.startHarRecording", "cloud:my_har_recording");
// Commands that perform web requests on device
driver.executeScript("seetest:client.stopHarRecording");
// Download file with unique name my_har_recording from file repository using Rest API

CaptureNetworkDump

DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "deviceid");

...
...
seetest.startHarRecording("C:\\tmp\\device.zip", "~t text/html");

seetest.stopHarRecording();