Skip to content

Instantly share code, notes, and snippets.

@gunesacar
Created April 22, 2016 13:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gunesacar/81ce3d54d3ea0e797102f8c302c6ab82 to your computer and use it in GitHub Desktop.
import unittest
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
class TestMarionette(unittest.TestCase):
def setUp(self):
self.driver = None
def tearDown(self):
try:
self.driver.quit()
except:
pass
def test_system_ff(self):
ff_bin = "/path/to/ff45/firefox" # works with v45
# ff_bin = "/path/to/esr38/firefox" # doesn't work with ESR38
firefox_capabilities = DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = True
firefox_capabilities['binary'] = ff_bin
self.driver = webdriver.Firefox(capabilities=firefox_capabilities)
self.driver.set_context('chrome')
print self.driver.execute_script("var c = Components.classes; return c;");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment