Bug 1275249 - Update UI tests to get property where applicable; r=whimboo
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 24 May 2016 14:26:13 +0100
changeset 337773 011e172a9ddffa9419b3282309ee170355c4f09a
parent 337772 7562ee87e961d3166ca77392e9b81eb4865c8f3e
child 337774 f37493706dd7f176aef13f699e82901fdc1b635d
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1275249, 1272653
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 1275249 - Update UI tests to get property where applicable; r=whimboo In bug 1272653, Get Element Attribute was split into Get Element Attribute for attributes and boolean attributes, and Get Element Property for properties. This patch addresses the fallout in the Firefox UI tests caused by those patches. MozReview-Commit-ID: 9S4epjmpU0o
testing/firefox-ui/tests/functional/security/test_enable_privilege.py
testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py
testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py
testing/firefox-ui/tests/functional/security/test_unknown_issuer.py
--- a/testing/firefox-ui/tests/functional/security/test_enable_privilege.py
+++ b/testing/firefox-ui/tests/functional/security/test_enable_privilege.py
@@ -14,9 +14,9 @@ class TestEnablePrivilege(FirefoxTestCas
 
         self.url = self.marionette.absolute_url('security/enable_privilege.html')
 
     def test_enable_privilege(self):
         with self.marionette.using_context('content'):
             self.marionette.navigate(self.url)
 
             result = self.marionette.find_element(By.ID, 'result')
-            self.assertEqual(result.get_attribute('textContent'), 'PASS')
+            self.assertEqual(result.get_property('textContent'), 'PASS')
--- a/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py
+++ b/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py
@@ -31,19 +31,19 @@ class TestSSLDisabledErrorPage(FirefoxTe
             self.assertRaises(MarionetteException, self.marionette.navigate, self.url)
 
             # Wait for the DOM to receive events
             time.sleep(1)
 
             # Verify "Secure Connection Failed" error page title
             title = self.marionette.find_element(By.CLASS_NAME, 'title-text')
             nss_failure2title = self.browser.get_entity('nssFailure2.title')
-            self.assertEquals(title.get_attribute('textContent'), nss_failure2title)
+            self.assertEquals(title.get_property('textContent'), nss_failure2title)
 
             # Verify "Try Again" button appears
             try_again_button = self.marionette.find_element(By.ID, 'errorTryAgain')
             self.assertTrue(try_again_button.is_displayed())
 
             # Verify the error message is correct
             short_description = self.marionette.find_element(By.ID, 'errorShortDescText')
             self.assertIn('SSL_ERROR_UNSUPPORTED_VERSION',
-                          short_description.get_attribute('textContent'))
-            self.assertIn('mozqa.com', short_description.get_attribute('textContent'))
+                          short_description.get_property('textContent'))
+            self.assertIn('mozqa.com', short_description.get_property('textContent'))
--- a/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py
+++ b/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py
@@ -52,9 +52,9 @@ class TestSubmitUnencryptedInfoWarning(F
             # TODO: Bug 1140470: use replacement for mozmill's waitforPageLoad
             Wait(self.marionette, timeout=self.browser.timeout_page_load).until(
                 lambda mn: mn.execute_script('return document.readyState == "DOMContentLoaded" ||'
                                              '       document.readyState == "complete";')
             )
 
             # Check that search_term contains the test string.
             search_term = self.marionette.find_element(By.ID, 'search-term')
-            self.assertEqual(search_term.get_attribute('textContent'), self.test_string)
+            self.assertEqual(search_term.get_property('textContent'), self.test_string)
--- a/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py
+++ b/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py
@@ -22,14 +22,14 @@ class TestUnknownIssuer(FirefoxTestCase)
             # Go to a site that has a cert with an unknown issuer
             self.assertRaises(MarionetteException, self.marionette.navigate, self.url)
 
             # Wait for the DOM to receive events
             time.sleep(1)
 
             # Check for the correct error code
             error = self.marionette.find_element(By.ID, 'errorCode')
-            self.assertEquals(error.get_attribute('textContent'),
+            self.assertEquals(error.get_property('textContent'),
                               'SEC_ERROR_UNKNOWN_ISSUER')
 
             # Verify the "Go Back" and "Advanced" buttons appear
             self.assertIsNotNone(self.marionette.find_element(By.ID, 'returnButton'))
             self.assertIsNotNone(self.marionette.find_element(By.ID, 'advancedButton'))