0

I have to perform testing through selenium webdriver(java) on Site analytics of a website. All the attributes, values are sent to the analytics toold via URL header request. I would like to capture the request alone so that I can perform my manipulations and extract the attributes and their values.

I tried BrowserMob tool. It's getting me the entire traffic in the form of HAR file. is there a way to extract the request alone?

I tried server.setCaptureHeaders(true); but it didn't help much as I see a whole bunch of URLs in the HAR. I'm interested in only one that is sent to the analytics website. There is a URL thats sent as a request behind the scene. Few analytics plugin are able to exactly get the request URL and extract the attribute values but I can't automate through those plugins.

Or is there a way to rip off only certain requests from HAR?

PSR
  • 39,804
  • 41
  • 111
  • 151
user1669488
  • 227
  • 1
  • 2
  • 10

1 Answers1

0

BMP is a great tool. You can only create a new har before the request is sent and read it after this. You can iterate through the dict it returns and find the request you need

Furious Duck
  • 2,009
  • 1
  • 16
  • 18