Bug 1274550 - Simplify test case for get_active_element; r=automatedtester
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 26 May 2016 13:05:03 +0100
changeset 299193 cdac1e9c5416558e08f32e507f61ac6a33c1036f
parent 299192 8218106c37b44d6d56945d198a41b44ba224b7d5
child 299194 dd558e06d595766b9e273482af05baee33dcbdc6
push id77467
push useratolfsen@mozilla.com
push dateThu, 26 May 2016 16:34:43 +0000
treeherdermozilla-inbound@dd558e06d595 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester
bugs1274550
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1274550 - Simplify test case for get_active_element; r=automatedtester MozReview-Commit-ID: 7UYUFccdLV5
testing/marionette/harness/marionette/tests/unit/test_findelement.py
--- a/testing/marionette/harness/marionette/tests/unit/test_findelement.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_findelement.py
@@ -144,19 +144,18 @@ class TestElements(MarionetteTestCase):
 
     def test_css_selector_scope_doesnt_start_at_rootnode(self):
         el = self.marionette.find_element(By.ID, "mozLink")
         nav_el = self.marionette.find_element(By.ID, "testDiv")
         found_els = nav_el.find_elements(By.CSS_SELECTOR, "a")
         self.assertFalse(el.id in [found_el.id for found_el in found_els])
 
     def test_finding_active_element_returns_element(self):
-        fbody = self.marionette.find_element(By.TAG_NAME, 'body')
-        abody = self.marionette.get_active_element()
-        self.assertEqual(fbody, abody)
+        body = self.marionette.find_element(By.TAG_NAME, "body")
+        self.assertEqual(body, self.marionette.get_active_element())
 
     def test_unknown_selector(self):
         with self.assertRaises(InvalidSelectorException):
             self.marionette.find_element("foo", "bar")
 
     def test_element_id_is_valid_uuid(self):
         el = self.marionette.find_element(By.TAG_NAME, "body")
         uuid_regex = re.compile('^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$')