import pytest


@pytest.fixture(scope='session')
def session_capabilities(session_capabilities):
    session_capabilities.setdefault('tags', []).append('treeherder')
    return session_capabilities


@pytest.fixture
def selenium(selenium):
    selenium.maximize_window()
    return selenium

@@ -9,16 +9,258 @@
 ytest%0A%0A%0A
+@pytest.fixture%0Adef capabilities(request, capabilities):%0A    driver = request.config.getoption('driver')%0A    if capabilities.get('browserName', driver).lower() == 'firefox':%0A        capabilities%5B'marionette'%5D = True%0A    return capabilities%0A%0A%0A
 @pytest.
@@ -309,16 +309,30 @@
 ilities(
+pytestconfig, 
 session_
@@ -342,24 +342,84 @@
 abilities):%0A
+    if pytestconfig.getoption('driver') == 'SauceLabs':%0A    
     session_

Switch to using Marionette/geckodriver (#2656)