testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/about_window/window.py
author Henrik Skupin <mail@hskupin.info>
Thu, 24 Nov 2016 17:02:52 +0100
changeset 324793 7eab0a7c766e258f2849edf6b8666727354a2968
parent 322220 testing/puppeteer/firefox/firefox_puppeteer/ui/about_window/window.py@608cebbca5c485f93e6f50c812c0a36b22cdf5cb
permissions -rw-r--r--
Bug 1319705 - Move Puppeteer to testing/marionette and make it available for Marionette tests in test packages. r=gps MozReview-Commit-ID: 521o0fV72SQ

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

from marionette_driver import By

from firefox_puppeteer.ui.about_window.deck import Deck
from firefox_puppeteer.ui.windows import BaseWindow, Windows


class AboutWindow(BaseWindow):
    """Representation of the About window."""
    window_type = 'Browser:About'

    dtds = [
        'chrome://branding/locale/brand.dtd',
        'chrome://browser/locale/aboutDialog.dtd',
    ]

    @property
    def deck(self):
        """The :class:`Deck` instance which represents the deck.

        :returns: Reference to the deck.
        """
        self.switch_to()

        deck = self.window_element.find_element(By.ID, 'updateDeck')
        return Deck(self.marionette, self, deck)


Windows.register_window(AboutWindow.window_type, AboutWindow)