Skip to content

Instantly share code, notes, and snippets.

@tristandostaler
Created July 7, 2016 16:35
Show Gist options
  • Save tristandostaler/c292a857215e7978ce2a5b3637b57ebd to your computer and use it in GitHub Desktop.
Save tristandostaler/c292a857215e7978ce2a5b3637b57ebd to your computer and use it in GitHub Desktop.
Start Selenium python script
browser = None
def StartSelenium():
import selenium
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
import binascii
import hashlib
firefox_capabilities = DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = True
firefox_capabilities['binary'] = '/usr/bin/firefox'
global browser
browser = webdriver.Firefox(capabilities=firefox_capabilities)
browser.get('https://www.google.com')
StartSelenium()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment