Example #1
0
 def _type_in_field(self, add_locator, field_locator, value):
     Wait(self.marionette).until(
         expected.element_present(*add_locator)).tap()
     element = Wait(self.marionette).until(
         expected.element_present(*field_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.clear()
     element.send_keys(value)
Example #2
0
 def email(self, value):
     """Set the value of the email field."""
     email = Wait(self.driver, self.timeout).until(
         expected.element_present(*self._email_input_locator))
     Wait(self.driver,
          self.timeout).until(expected.element_displayed(email))
     email.clear()
     email.send_keys(value)
Example #3
0
 def email(self, value):
     """Set the value of the email field."""
     email = Wait(self.driver, self.timeout).until(
         expected.element_present(*self._email_input_locator))
     Wait(self.driver, self.timeout).until(
         expected.element_displayed(email))
     email.clear()
     email.send_keys(value)
Example #4
0
    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()
Example #5
0
    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()
Example #6
0
 def _type_in_field(self, add_locator, field_locator, value):
     Wait(self.marionette).until(expected.element_present(*add_locator)).tap()
     element = Wait(self.marionette).until(expected.element_present(*field_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.clear()
     element.send_keys(value)