log_file February 2016

Installing Browsermob proxy for getting HTTP codes

I might seem naive while asking this. I need to retrieve various HTTP codes, for few of our test scenarios. Now I know that Selenium cannot do it alone and we have to use a third party resource- may be a proxy like Browsermob.

Has any one already worked on this. I have gone through various tutorials -like one from here but I can't seem to be able to work around using this.

I installed Browsermob using the pip method and so I am giving the path as

  from browsermobproxy import Server
  server = Server('/usr/local/lib/python3.4/dist-packages/browsermobproxy')

However, I am receiving the exception

  Exception: Browsermob-Proxy binary couldn't be found in path provided: /usr/local/lib/python3.4/dist-packages/browsermobproxy 

My question is - is there anything- any file that I might be missing here? Do I need to download any other files or my path is incorrect?

Answers


Chen Xiaofeng February 2016

Not sure if you understand browsermob-proxy-py , it's a client implementation instead of server. so you need to install the server browsermob-proxy first(https://github.com/lightbody/browsermob-proxy) and run the proxy with default port.

Post Status

Asked in February 2016
Viewed 1,164 times
Voted 5
Answered 1 times

Search




Leave an answer