-
-
Save Osmose/e7e4f93008335e2e56ebe95100a78f4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import path | |
from firefox_cert_override import generate_cert_override, CertOverrideEntry, OverrideMask | |
from selenium.webdriver import Firefox, FirefoxProfile | |
def create_driver(): | |
profile = FirefoxProfile() | |
with open(path.join(profile.profile_dir, 'cert_override.txt'), 'w') as f: | |
f.write(generate_cert_override([ | |
CertOverrideEntry.from_certificate_file( | |
'localhost:8000', | |
'/Users/mkelly/Projects/normandy/etc/ssl/normandy_dev.cert', | |
mask=OverrideMask(True, True, True), | |
) | |
])) | |
return Firefox(firefox_profile=profile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment