Skip to main content

Network Capture

important

This page documents how to start network capture in an Appium session using capabilities or execute methods. For a full overview of the network capture feature including supported platforms, proxy modes and special platform considerations, see the main Network Capture documentation page.

Network Capture Capabilities

These capabilities determine the initial state of the network capture at session start.

tvlabs:log_network

Type: boolean

Enables network capture for the session. The capture begins when the session starts and stops when the session ends.

{
"tvlabs:constraints": "platform_key:...",
"tvlabs:log_network": true
}

tvlabs:network_capture_direct_proxy

Type: boolean

When tvlabs:log_network is true, enables direct proxy mode for the session. When set, no traffic interception rules are applied — your application must send traffic to the proxy directly by prefixing request URLs with http://local.tvlabs.ai:8087/;. See the Direct Proxy section for more details.

{
"tvlabs:constraints": "platform_key:...",
"tvlabs:log_network": true,
"tvlabs:network_capture_direct_proxy": true
}

tvlabs:network_capture_filters

Type: array

A list of filter objects to apply to the capture when tvlabs:log_network is true. Filters reduce HAR file size by dropping or omitting matched entries.

{
"tvlabs:constraints": "platform_key:...",
"tvlabs:log_network": true,
"tvlabs:network_capture_filters": [
{ "action": "drop", "mime_type": "image/.+" },
{ "action": "omit", "target": "response", "hostname": "analytics\\.example\\.com" }
]
}

Network Capture Execute Methods

Network capture can also be started and stopped mid-session using Appium execute methods, allowing finer control over when capture is active. See the Execute Methods page for full documentation of tvlabs: startNetworkCapture and tvlabs: stopNetworkCapture, including support for name, direct_proxy, and filters options.