1

I am using Browsermob proxy to catch HAR content of loaded web page thru chrome webdriver.

  <dependency>
        <groupId>net.lightbody.bmp</groupId>
        <artifactId>browsermob-core-littleproxy</artifactId>
        <version>2.1.0-beta-3</version>
    </dependency>

And here is how I initialize proxy:

ChromeOptions options = new ChromeOptions();

    for (String extension : DriverProperties.CHROME_EXTENSIONS.getStringArray()) {
        options.addExtensions(new File(extension));
    }

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);
    capabilities.setCapability(CapabilityType.SUPPORTS_APPLICATION_CACHE, false);
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);

    proxy = new BrowserMobProxyServer();
    proxy.start(0);

    proxy.setHarCaptureTypes(CaptureType.RESPONSE_CONTENT, CaptureType.RESPONSE_BINARY_CONTENT);


    // get the Selenium proxy object
    Proxy seleniumProxy = ClientUtil.createSeleniumProxy(proxy);

    capabilities.setCapability(CapabilityType.PROXY, seleniumProxy);
    proxy.newHar();

    ChromeDriver driver = new ChromeDriver(capabilities); 

But when I try to get url via https (for exapmle https://screen.yahoo.com) I see "This web page has a redirect loop" in the web browser. Is there any solution for this?

user18190
  • 23
  • 5

0 Answers0