Hello I'm trying get a har file using the code below but it is not return any har data? Does anyone have clues on what might be going wrong?
from browsermobproxy import Server
server = Server("./bin/browsermob-proxy")
server.start()
proxy = server.create_proxy()
from selenium import webdriver
co = webdriver.ChromeOptions()
co.add_argument('--proxy-server={host}:{port}'.format(host='localhost', port=proxy.port))
driver = webdriver.Chrome(executable_path="chromedriver", chrome_options=co)
proxy.new_har('req',options={'captureHeaders': True,'captureContent':True})
driver.get(url)
proxy.har # returns a HARenter code here