简体   繁体   中英

how to capture network for native app with appium and browsermob proxy

I need help, i connected browsermob proxy with appium on my android device, i see all network calls, but on all HHTPS got error can not connect host.

here my browsermob proxy setup:

proxy = new BrowserMobProxyServer();
proxy.setTrustAllServers(true);
proxy.start(proxyPort);

here my appium setup:

    browserMobProxy.getProxy().setHarCaptureTypes(CaptureType.getResponseCaptureTypes());
browserMobProxy.getProxy().setHarCaptureTypes(CaptureType.getHeaderCaptureTypes());
browserMobProxy.getProxy().setHarCaptureTypes(CaptureType.getRequestCaptureTypes());
browserMobProxy.getProxy().setHarCaptureTypes(CaptureType.getCookieCaptureTypes());
browserMobProxy.getProxy().setHarCaptureTypes(CaptureType.getBinaryContentCaptureTypes());
browserMobProxy.getProxy().setHarCaptureTypes(CaptureType.getAllContentCaptureTypes());
browserMobProxy.getProxy().newHar(browserMobProxy.getHarRef());
capabilities.setCapability(CapabilityType.PROXY, browserMobProxy.getSeleniumProxy());
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability("unlockType", "pin");
capabilities.setCapability("unlockKey", "1111");

URL serverAddress = new URL("http://127.0.0.1:" + port + "/wd/hub");

androidDriver = new AndroidDriver(serverAddress, capabilities);

I installed on device the certificate, and setup manual proxy with IP:PORT

What I miss to get all https requests and responses ? Thanks

一切如我所写,我只是在设备上安装了ca-certificate-rsa.cer而不是ca-certificate-ec.cer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM