I have been trying to integrate BrowserMob to my selenium tests. It works fine with the website that works on HTTP, but with https websites, the browsers stop working and the HAR file doesn't contain any requests.
When navigating to an https site I get this error on the browser.
"There is something wrong with the proxy server or the address is incorrect."
Here is my code.
@Test
public void browsermobtest() {
proxy.start(9091);
// get the Selenium proxy object
Proxy seleniumProxy = ClientUtil.createSeleniumProxy(proxy);
// configure it as a desired capability
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.PROXY, seleniumProxy);
System.setProperty("webdriver.chrome.driver", "C:/Users/Madis/Documents/chromedriver.exe");
WebDriver driver = new ChromeDriver(capabilities);
// enable more detailed HAR capture, if desired (see CaptureType for the complete list)
proxy.enableHarCaptureTypes(CaptureType.REQUEST_CONTENT, CaptureType.RESPONSE_CONTENT);
// create a new HAR with the label "google.com"
proxy.newHar("http://www.google.com/");
// open google.com
driver.get("https://www.google.ee/#gfe_rd=cr");
driver.findElement(By.cssSelector("#gb_70")).click();
}
@AfterMethod
public void Afterthetest() {
// get the HAR data
Har har = proxy.getHar();
File harFile = new File("C:/Users/Madis/Documents/har.har");
try {
har.writeTo(harFile);
} catch (IOException e) {
e.printStackTrace();
}
}
}--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8a6cc1d9-a74e-4208-9245-02ffe36d4230%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/86c46915-9d50-4500-aa24-bbdeeb241aa0%40googlegroups.com.
True. After Patrick announced that he would no longer be able to support the BMP library I think Jason took over and was maintaining it. But yeah as you said, there hasn't been much of an activity there. The last commit on BMP was back in Sept 2017. So I think there's a good chance that it got shelved.Thanks for sharing that alternative. I wasn't aware of BrowserUp.Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/My Technical Scribblings @ https://rationaleemotions.com/
On Fri, Jul 5, 2019 at 7:26 PM Mark Collin <fyre...@gmail.com> wrote:
--
https://github.com/lightbody/browsermob-proxyThere haven't been any commits for 2 years so I assume so.BrowserUp looks to be actively maintained at the moment.
On Friday, 5 July 2019 12:26:56 UTC+1, Krishnan Mahadevan wrote:Mark,So BMP has been shelved is it?Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/My Technical Scribblings @ https://rationaleemotions.com/
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.
mitm module for instructions on generating or using your own root certificate and private key with MITM.To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a0f1fa4b-4991-454a-bf58-1d549e834223%40googlegroups.com.