Bug 1375660 - Fix test_l10n.py for title text. draft
authorHenrik Skupin <mail@hskupin.info>
Mon, 02 Oct 2017 22:25:42 +0200
changeset 673814 41ca63fc00131b20299a2da205a40553669d2825
parent 673329 97efdde466f18cf580fda9673cf4c38ee21fc7b7
child 673815 09e2b8748350457e2eee7dc51eed945dc6ce0127
child 673824 34754e30c7dabd7d25d93fb4a1ee78e5bb6585ac
push id82654
push userbmo:hskupin@gmail.com
push dateMon, 02 Oct 2017 20:54:50 +0000
bugs1375660
milestone58.0a1
Bug 1375660 - Fix test_l10n.py for title text. The title is not a visible element and as such getElementText will return an empty string. Instead use the h1 tag which has the same content to get this test passing. MozReview-Commit-ID: FntduPdn1P9
testing/firefox-ui/tests/puppeteer/test_l10n.py
--- a/testing/firefox-ui/tests/puppeteer/test_l10n.py
+++ b/testing/firefox-ui/tests/puppeteer/test_l10n.py
@@ -31,17 +31,17 @@ class TestL10n(PuppeteerMixin, Marionett
         dtds = ['chrome://global/locale/about.dtd',
                 'chrome://global/locale/aboutSupport.dtd']
 
         value = self.l10n.localize_entity(dtds, 'aboutSupport.pageTitle')
 
         self.marionette.set_context(self.marionette.CONTEXT_CONTENT)
         self.marionette.navigate('about:support')
 
-        elm = self.marionette.find_element(By.TAG_NAME, 'title')
+        elm = self.marionette.find_element(By.TAG_NAME, 'h1')
         self.assertEqual(value, elm.text)
 
     def test_properties(self):
         properties = ['chrome://global/locale/filepicker.properties',
                       'chrome://global/locale/findbar.properties']
 
         # TODO: Find a way to verify the retrieved translated string
         value = self.l10n.localize_property(properties, 'NotFound')