Skip to content

Instantly share code, notes, and snippets.

@asciimo
Last active July 25, 2016 02:17
Show Gist options
  • Save asciimo/7443266f4b3988b22d59da874291d49a to your computer and use it in GitHub Desktop.
Save asciimo/7443266f4b3988b22d59da874291d49a to your computer and use it in GitHub Desktop.
Configure custom Firefox Developer Edition path for python3 selenium, on a Mac
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary("/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox")
browser = webdriver.Firefox(firefox_binary=binary)
# Or, in your terminal session: PATH=$PATH:/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox
@asciimo
Copy link
Author

asciimo commented Jul 25, 2016

On my Mac in virtualenv, simply setting the $PATH environment variable does not launch Firefox Developer Edition; regular Firefox still fires up. I have to explicitly set the developer version via FirefoxBinary().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment