I have written following code in python to work with BrowserMob-proxy. Have the same library added and I can see it in site packages.
from selenium import webdriver
from browsermobproxy import Server
server = Server("browsermob-proxy-2.1.4/bin/browsermob-proxy")
server.start()
proxy = self.server.create_proxy()
driver = webdriver.Chrome
driver = webdriver.Chrome(executable_path="/Users/user/Downloads/chromedriver")
proxy.new_har("google")
proxy.har # returns a HAR JSON blob
driver.get("http://www.python.org")
server.stop()
driver.quit()
driver.close()
Getting below error and in log file I see operation is not permitted. I have seen many available resources online but no sure if anything to be set in addition to other.Note: I am using Mac ..Anything to be done here ?
Seeing this in eclipse console: Browsermobproxy.exceptions.ProxyServerError: The Browsermob-Proxy server process failed to start. Check <_io.TextIOWrapper name='/..workspace/server.log' mode='w' encoding='UTF-8'>for a helpful error message.