Skip to content

Instantly share code, notes, and snippets.

@rinchik
Last active May 29, 2016 17:24
Show Gist options
  • Save rinchik/f2f22025842e15def09f1e955b313e1f to your computer and use it in GitHub Desktop.
Save rinchik/f2f22025842e15def09f1e955b313e1f to your computer and use it in GitHub Desktop.
Setting up Python Selenium to use one default Firefox user profile
BROWSER_PROFILE_PATH = '/Users/rinat/Library/Application Support/Firefox/Profiles/4yu1sfet.rinat'
TIMESHEET_URL = 'http://url.to.pwa'
def set_up_firefox(self):
print "Configuring Firefox web-browser..."
profile = webdriver.FirefoxProfile(self.BROWSER_PROFILE_PATH)
self.driver = webdriver.Firefox(firefox_profile=profile)
self.driver.get(self.TIMESHEET_URL)
print "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment