From af7f7ee757591d9812f55b44a4a389e33eb63130 Mon Sep 17 00:00:00 2001 From: David Burns Date: Mon, 23 Feb 2015 14:42:17 +0000 Subject: [PATCH] Bug 1107336: Update loop tests to use new Marionette Driver; r=jgriffin --- .../loop/test/functional/test_1_browser_call.py | 16 +++++++++++----- .../loop/test/shared/frontend_tester.py | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/browser/components/loop/test/functional/test_1_browser_call.py b/browser/components/loop/test/functional/test_1_browser_call.py index 70c17b7456d..54281267178 100644 --- a/browser/components/loop/test/functional/test_1_browser_call.py +++ b/browser/components/loop/test/functional/test_1_browser_call.py @@ -1,12 +1,18 @@ from marionette_test import MarionetteTestCase -from by import By -import urlparse -from errors import NoSuchElementException, StaleElementException -# noinspection PyUnresolvedReferences -from wait import Wait +try: + from by import By + from errors import NoSuchElementException, StaleElementException + # noinspection PyUnresolvedReferences + from wait import Wait +except ImportError: + from marionette_driver.by import By + from marionette_driver.errors import NoSuchElementException, StaleElementException + # noinspection PyUnresolvedReferences + from marionette_driver import Wait import os import sys +import urlparse sys.path.insert(1, os.path.dirname(os.path.abspath(__file__))) import pyperclip diff --git a/browser/components/loop/test/shared/frontend_tester.py b/browser/components/loop/test/shared/frontend_tester.py index 7835fae0b9d..d5364853a17 100644 --- a/browser/components/loop/test/shared/frontend_tester.py +++ b/browser/components/loop/test/shared/frontend_tester.py @@ -1,5 +1,5 @@ from marionette_test import MarionetteTestCase -from errors import NoSuchElementException +from marionette_driver.errors import NoSuchElementException import threading import SimpleHTTPServer import SocketServer