コード例 #1
0
 def _perform_search(self, term):
     self.marionette.find_element(*self._search_toggle_locator).tap()
     search_box = Wait(self.marionette).until(
         expected.element_present(*self._search_input_locator))
     Wait(self.marionette).until(expected.element_displayed(search_box))
     search_box.send_keys(term)
     search_box.send_keys(Keys.RETURN)
コード例 #2
0
ファイル: gmail.py プロジェクト: romanbaumgaertner/gaia
 def gmail_login(self, user, passwd):
     email = Wait(self.marionette).until(
         expected.element_present(*self._email_locator))
     Wait(self.marionette).until(expected.element_displayed(email))
     email.tap()
     email.send_keys(user)
     password = self.marionette.find_element(*self._password_locator)
     password.tap()
     password.send_keys(passwd)
     self.keyboard.dismiss()
     self.marionette.find_element(*self._sign_in_locator).tap()
コード例 #3
0
ファイル: gmail.py プロジェクト: 6a68/gaia
 def gmail_login(self, user, passwd):
     email = Wait(self.marionette).until(
         expected.element_present(*self._email_locator))
     Wait(self.marionette).until(expected.element_displayed(email))
     email.tap()
     email.send_keys(user)
     password = self.marionette.find_element(*self._password_locator)
     password.tap()
     password.send_keys(passwd)
     self.keyboard.dismiss()
     self.marionette.find_element(*self._sign_in_locator).tap()
コード例 #4
0
    def a11y_connect_to_wifi(self, network_ssid, password, key_management=None):
        wifi_network = self.find_wifi_network(network_ssid)
        self.accessibility.click(wifi_network)

        # This is in the event we are using a Wifi Network that requires a password
        # We cannot be sure of this thus need the logic
        if key_management:
            password_element = Wait(self.marionette).until(
                expected.element_present(*self._password_input_locator))
            Wait(self.marionette).until(expected.element_displayed(password_element))
            password_element.send_keys(password)
            self.accessibility.click(self.marionette.find_element(*self._join_network_locator))
コード例 #5
0
ファイル: fxaccounts.py プロジェクト: AutomatedTester/gaia
    def enter_password(self, password=None):
        input = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._password_locator))
        Wait(self.marionette).until(expected.element_displayed(input))
        input.send_keys(password)

        # Wait until the keyboard is completely displayed, otherwise tapping
        # the next button is unreliable
        active_frame = self.marionette.get_active_frame()
        self.marionette.switch_to_frame()
        Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
        self.marionette.switch_to_frame(active_frame)

        self.marionette.find_element(*self._next_locator).tap()
コード例 #6
0
ファイル: app.py プロジェクト: sdglhm/gaia
    def search(self, term):
        iframe = Wait(self.marionette).until(
            expected.element_present(*self._marketplace_iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(iframe))
        self.marionette.switch_to_frame(iframe)

        search_box = Wait(self.marionette).until(
            expected.element_present(*self._search_locator))
        Wait(self.marionette).until(expected.element_displayed(search_box))

        # search for the app
        search_box.send_keys(term)
        search_box.send_keys(Keys.RETURN)
        return SearchResults(self.marionette)
コード例 #7
0
    def enter_password(self, password=None):
        input = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._password_locator))
        Wait(self.marionette).until(expected.element_displayed(input))
        input.send_keys(password)

        # Wait until the keyboard is completely displayed, otherwise tapping
        # the next button is unreliable
        active_frame = self.marionette.get_active_frame()
        self.marionette.switch_to_frame()
        Wait(self.marionette).until(
            lambda m: self.keyboard.is_keyboard_displayed)
        self.marionette.switch_to_frame(active_frame)

        self.marionette.find_element(*self._next_locator).tap()
コード例 #8
0
ファイル: app.py プロジェクト: romanbaumgaertner/gaia
    def search(self, term):
        iframe = Wait(self.marionette).until(
            expected.element_present(*self._marketplace_iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(iframe))
        self.marionette.switch_to_frame(iframe)

        search_box = Wait(self.marionette).until(
            expected.element_present(*self._search_locator))
        Wait(self.marionette).until(expected.element_displayed(search_box))

        # This sleep is necessary, otherwise the search results are not shown on desktop b2g
        import time
        time.sleep(0.5)

        # search for the app
        search_box.send_keys(term)
        search_box.send_keys(Keys.RETURN)
        return SearchResults(self.marionette)
コード例 #9
0
ファイル: app.py プロジェクト: AutomatedTester/gaia
    def search(self, term):
        iframe = Wait(self.marionette).until(
            expected.element_present(*self._marketplace_iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(iframe))
        self.marionette.switch_to_frame(iframe)

        search_box = Wait(self.marionette).until(
            expected.element_present(*self._search_locator))
        Wait(self.marionette).until(expected.element_displayed(search_box))

        # This sleep is necessary, otherwise the search results are not shown on desktop b2g
        import time
        time.sleep(0.5)

        # search for the app
        search_box.send_keys(term)
        search_box.send_keys(Keys.RETURN)
        return SearchResults(self.marionette)
コード例 #10
0
ファイル: settings.py プロジェクト: bebef1987/gaia
    def select_when_use_is_above_unit_and_value(self, unit, value):
        when_use_is_above_button = self.marionette.find_element(*self._when_use_is_above_button_locator)
        Wait(self.marionette).until(lambda m: when_use_is_above_button.get_attribute('disabled') == 'false')
        when_use_is_above_button.tap()

        current_unit = Wait(self.marionette).until(
            expected.element_present(*self._unit_button_locator))
        Wait(self.marionette).until(expected.element_displayed(current_unit))
        if current_unit.text != unit:
            current_unit.tap()
            # We need to wait for the javascript to do its stuff
            Wait(self.marionette).until(lambda m: current_unit.text == unit)

        # clear the original assigned value and set it to the new value
        size = Wait(self.marionette).until(expected.element_present(*self._size_input_locator))
        Wait(self.marionette).until(expected.element_displayed(size))
        size.clear()
        size.send_keys(value)
        self.marionette.find_element(*self._usage_done_button_locator).tap()
コード例 #11
0
ファイル: fxaccounts.py プロジェクト: AutomatedTester/gaia
    def enter_email(self, email=None):
        self.marionette.switch_to_frame()
        iframe = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(iframe))
        Wait(self.marionette, timeout=60).until(lambda m: iframe.get_attribute('data-url') != 'about:blank')
        self.marionette.switch_to_frame(iframe)

        input = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._input_locator))
        Wait(self.marionette).until(expected.element_displayed(input))
        input.send_keys(email)

        # Wait until the keyboard is completely displayed, otherwise tapping
        # the next button is unreliable
        self.marionette.switch_to_frame()
        Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
        self.marionette.switch_to_frame(iframe)

        self.marionette.find_element(*self._next_locator).tap()
コード例 #12
0
    def enter_email(self, email=None):
        self.marionette.switch_to_frame()
        iframe = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(iframe))
        Wait(self.marionette, timeout=60).until(
            lambda m: iframe.get_attribute('data-url') != 'about:blank')
        self.marionette.switch_to_frame(iframe)

        input = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._input_locator))
        Wait(self.marionette).until(expected.element_displayed(input))
        input.send_keys(email)

        # Wait until the keyboard is completely displayed, otherwise tapping
        # the next button is unreliable
        self.marionette.switch_to_frame()
        Wait(self.marionette).until(
            lambda m: self.keyboard.is_keyboard_displayed)
        self.marionette.switch_to_frame(iframe)

        self.marionette.find_element(*self._next_locator).tap()
コード例 #13
0
ファイル: settings.py プロジェクト: orivier/gaia
    def select_when_use_is_above_unit_and_value(self, unit, value):
        when_use_is_above_button = self.marionette.find_element(
            *self._when_use_is_above_button_locator)
        Wait(self.marionette).until(lambda m: when_use_is_above_button.
                                    get_attribute('disabled') == 'false')
        when_use_is_above_button.tap()

        current_unit = Wait(self.marionette).until(
            expected.element_present(*self._unit_button_locator))
        Wait(self.marionette).until(expected.element_displayed(current_unit))
        if current_unit.text != unit:
            current_unit.tap()
            # We need to wait for the javascript to do its stuff
            Wait(self.marionette).until(lambda m: current_unit.text == unit)

        # clear the original assigned value and set it to the new value
        size = Wait(self.marionette).until(
            expected.element_present(*self._size_input_locator))
        Wait(self.marionette).until(expected.element_displayed(size))
        size.clear()
        size.send_keys(value)
        self.marionette.find_element(*self._usage_done_button_locator).tap()