Httpプロキシを設定するとBrowsermob Proxyを使用してネットワークログを取得できないため、ファイルを作成するだけですが、ファイル内にログは表示されません以下はSelenium Webdriverを使用してBrowserMobプロキシ経由でネットワークトラフィックログを取得できない
私のコードです: -
String strFilePath = "./PerformanceLogs/PerformanceLogs.har";
String noProxy = "localhost, 127.0.0.1";
LegacyProxyServer server = new BrowserMobProxyServer();
server.start();
server.setCaptureHeaders(true);
server.setCaptureContent(true);
Proxy proxy = server.seleniumProxy().setHttpProxy(PROXY)
.setFtpProxy(PROXY)
.setSslProxy(PROXY)
.setNoProxy(noProxy);
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(CapabilityType.PROXY, proxy);
WebDriver driver = new FirefoxDriver(capabilities);
server.newHar("NetworkLogs");
driver.navigate().to("https://url-");
driver.findElements(xpath="").click();
pMonitor = new Prism_Selenium_Monitor_Tab(driver);
pMonitor.prism_monitor_credentialDeploy(URL,excelfile[0], excelfile[4]);
Har har = server.getHar();
File harFile = new File(strFilePath);
har.writeTo(harFile);
server.stop();
誰もこれで私を喜ばせることができますか?あなたがLegacyProxyはを開始しているいくつかの理由のため、事前