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.

Select Sessions tab

Search for your session, then select the Session ID.

Learn more about searching for a session.

Search for your session ID

Select Explorer.

Select Explorer tab

Select the dropdown and choose Observer Request / Response Payloads or Analyze Response Times.

Select Observe Request/ Response Payloads or Analyze Response Times

Now you can review network payload data in Session Explorer.

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.