You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
profile = webdriver.FirefoxProfile()
profile.set_preference("devtools.netmonitor.har.contentAPIToken", True)
profile.set_preference("extensions.netmonitor.har.autoConnect", True)
profile.set_preference("devtools.netmonitor.har.enableAutoExportToFile", True)
driver = webdriver.Firefox(firefox_profile=profile)
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
I downloaded the extension from this page and put it into the firefox extension folder (which I need to do later as the tests are running inside a docker image. So I need a way to copy and enable an extension without any firefox GUI), renamed as
For copying/installing the plugin in Docker, you can mount the plugin from the outside of the container and add the extension something like this, (that is NodeJS of Selenium but it should be something like that in Python too).
I tried the description given in the main page: http://www.softwareishard.com/blog/har-export-trigger/
and created the following script:
I downloaded the extension from this page and put it into the firefox extension folder (which I need to do later as the tests are running inside a docker image. So I need a way to copy and enable an extension without any firefox GUI), renamed as
[email protected]
However, after running the script, no
har
file or folder is being created.The text was updated successfully, but these errors were encountered: