How can I use Appium to capture network traffic during mobile app automation?

In our WebDriverIO + Appium setup, we couldn’t directly hook into the network layer like in a browser, so we used BrowserMob Proxy with the Appium server.

We launched the proxy as a separate process, captured traffic into HAR files, and parsed them post-test. It works well with Android emulators especially.

One caveat: iOS is trickier due to certificate issues, so we focused Android-first. If you’re used to Charles manually, this feels very similar, just programmatically controlled.