Capture network payload data during an automation session Learn how to capture network payload data during an automation session so you can review network payload data in Session Explorer. Before you start You’ll need to set up network payload capture. Enable network payload capture You can add the capability to your existing capabilities, or you can auto-generate new capabilities to use instead. In your test suite’s config file, set useConfiguration to the configuration you previously created. Example public static DesiredCapabilities getIPhone11ProIOS146DesiredCapabilities() { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("kobiton:useConfiguration", "https-requests"); return capabilities; } When you’re finished, save your changes, then start your automation session. Launch Session Explorer After your session, select Sessions. Search for your session, then select the Session ID. Learn more about searching for a session. Select Explorer. Select the dropdown and choose Observer Request / Response Payloads or Analyze Response Times. Now you can review network payload data in Session Explorer. Clear custom HTTP proxy settings on device At the start of a Network Payload Capture (NPC)–enabled session, the system sets a custom HTTP proxy on the device. This proxy is not cleared if: the No Cleanup policy is the default organization or team Cleanup Policy, or the Mac mini host has Cleanup disabled in the dc.ini configuration file (HealthService.EnableCleanup=false). If the NPC proxy is configured incorrectly or the proxy is turned off, the device will lose internet connectivity. NPC proxy configurations also block updates from Apple and Google servers and prevent provisioning profile verification from Apple servers due to certificate pinning. Methods to clear custom proxy settings and restore connectivity: Use a Cleanup Policy: Ensure that in the dc.ini file of the Mac mini host, HealthService.EnableCleanup is true. Restart deviceConnect services to apply changes. Set any custom Cleanup Policy or the Thorough Cleanup Policy as the default for the organization and/or team. Launch an NPC-enabled session on the device. Exit the session without retaining the device. The Cleanup step clears the custom proxy and restores internet connectivity. The custom proxy is cleared at the end of an NPC-enabled session, but not at the end of a normal session. Clear proxy settings manually: For Android devices: Launch a manual session. On the controls toolbar, select adb shell. Run the following command: settings put global http_proxy :0 For iOS devices configured with Option 1: Launch a manual session. Open the Settings app, then select General. Select VPN & Device Management. Open the Kobiton Certificate under Configuration Profiles. Select Remove Profile. For iOS devices configured with Option 2: Launch a manual session. Open the Settings app, then select Wi-Fi. Select the information icon next to the connected network. Under HTTP Proxy, select Configure Proxy, then choose Off. Limitations Network Payload Capture is not supported on Espresso and XCUITest automation sessions. NPC does not support capturing network traffic on domains that use a self-signed SSL certificate. Certificate pinning prevents network payload capture. If you want to capture payload for a native application, make sure to disable certificate pinning in your app. iOS devices cannot access any Apple domains (including App Store) in an NPC session. A custom configuration profile is needed to enable the HTTP Proxy on iOS devices. Therefore, NPC does not work if there is another HTTP Proxy configuration profile installed on the device. If iOS devices hosted on a Mac mini are supervised by multiple supervision identities (organizations), only one supervision identity—the one imported into the Mac mini host—will work with NPC.