question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BrowsermobProxy does not capture har logs for Microsoft Edge

See original GitHub issue

Hi BrowserMob version 2.0.0

below is my script. `// start the proxy ProxyServer server = new ProxyServer(4444); server.start(); //captures the moouse movements and navigations server.setCaptureHeaders(true); server.setCaptureContent(true);

Proxy proxy = server.seleniumProxy(); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(CapabilityType.PROXY, proxy);

WebDriver driver = new EdgeDriver(capabilities); server.newHar(“har123”);

driver.get(“http://yahoo.com”);

// get the HAR data Har har = server.getHar(); server.stop(); driver.quit(); `

My scripts work perfectly fine for chrome and firefox. When I try similar setup with MicrosoftEdge. The Scripts as normal but no Har entries are captured.“server.getHar()” returns blank.

in the log it says trying to read status from localhost<port> (not the exact error message)

My question:

  1. Does BrowserMob work with MS Edge?
  2. Does Edge needs any specific settings. My URL is a https url.
  3. Do we have a sample setup for MS edge with browsermob?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
gitgrimbocommented, Aug 28, 2016

FYI, I’ve seen something similar. My scenario:

  • Using Selenium Grid (v2.53.1).
  • Asking for Edge browser (Edge v13, MicrosoftWebDriver v2.10586). Passing in BMP as the proxy in the Selenium capabilities.
  • Edge not using the proxy settings in the capabilities object, therefore putting no HTTP traffic through BMP.

Edge version: browsermob-457

What I see:

  • BMP creates the HARs correctly as and when I ask it to. I.e. the HAR file is created, and the HAR has pages for every call to newPage() I make.
  • As there is no proxy traffic coming through BMP (because Edge has not set the proxy correctly), the HARs have no request data.
  • Chrome running on the same Selenium node as Edge sets the proxy correctly and sends requests via BMP.

Workaround:

  • I have had to manually set the Edge proxy settings on that particular Selenium node. Traffic now gets routed via BMP.
0reactions
gitgrimbocommented, Oct 12, 2016
  • open the Edge browser
  • set its proxy manually to host H and port P
  • start BMP on host H and port P
  • run tests
Read more comments on GitHub >

github_iconTop Results From Across the Web

Capture a browser trace for troubleshooting - Azure portal
Google Chrome and Microsoft Edge · Select the Network tab, then select Preserve log. Screenshot that highlights the Preserve log option on the ......
Read more >
BrowserMobProxy doesn't capture any entries into har file
Trying to capture http headers on some test page localhost:8000 and HAR file doesn't seem to contain anything in entry section. My code:...
Read more >
handling har files in browsermobproxy with selenium 2 and ...
I am using browsermobproxy to store xhr requests with selenium webdriver and python. proxy.new_har("req", options={'captureHeaders': True ...
Read more >
How to Collect a HAR File and HTTP Error Logs Usin...
Open the Microsoft Edge browser; Press F12 to open the debug pane; Clear the session history before reproducing. To clear the session history...
Read more >
Get HAR file with BrowserMob Proxy & Selenium Webdriver
This video will show how to capture all of the network traffic while using WebDriver and get the HAR file.How to Install Browser...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found