def start_browser(browserPath): ''' Start a Firefox browser and return a Marionette instance that can talk to it. ''' marionette = Marionette( bin=browserPath, # Need to avoid the browser and emulator's ports stepping # on each others' toes. port=2929, ) runner = marionette.runner if runner: runner.start() marionette.wait_for_port() marionette.start_session() marionette.set_context(marionette.CONTEXT_CHROME) return marionette
def start_browser(browser_path, app_args, startup_timeout): ''' Start a Firefox browser and return a Marionette instance that can talk to it. ''' marionette = Marionette( bin=browser_path, # Need to avoid the browser and emulator's ports stepping # on each others' toes. port=2929, app_args=app_args, gecko_log="firefox.log", startup_timeout=startup_timeout) runner = marionette.runner if runner: runner.start() marionette.wait_for_port() marionette.start_session() marionette.set_context(marionette.CONTEXT_CHROME) return marionette
def start_browser(browser_path, app_args, startup_timeout): ''' Start a Firefox browser and return a Marionette instance that can talk to it. ''' marionette = Marionette( bin=browser_path, # Need to avoid the browser and emulator's ports stepping # on each others' toes. port=2929, app_args=app_args, gecko_log="firefox.log", startup_timeout=startup_timeout ) runner = marionette.runner if runner: runner.start() marionette.wait_for_port() marionette.start_session() marionette.set_context(marionette.CONTEXT_CHROME) return marionette