Skip to main content

Network Capture

warning

Network capture is currently available on WebOS, Tizen, and tvOS only. Additional platform support will be rolled out incrementally.

Overview

Network capture for HTTP traffic is available for Appium sessions. After a capture has completed an HTTP archive (HAR) file will be available for download by members of your organization via the TV Labs sessions dashboard.

Network capture can be started in two different ways:

  • Appium capabilities
  • Appium execute method

Using Capabilities

Network capture can be enabled on session start by setting the tvlabs:log_network capability to true in the Appium session capabilities.

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

Using Execute Method

Network capture can be started or stopped in a middle of a session by using an Appium execute method. See more details on the Execute Methods page.

Viewing Network Logs

To download the HAR file for a session where network logging was enabled, navigate to the session in the TV Labs sessions dashboard. Scroll down and find the "Network Logs" section, and select the HTTP archives you wish to download.

Download network logs

note

Network logs may take a few moments to be available for download after the session ends.

There are many online tools available to view HAR files, but the easiest way is to import them into the Chrome DevTools. Open the DevTools within Chrome, select the "Network" tab, and look for the "Import HAR" button

Network logs in Chrome DevTools