Пример #1
0
 def wait_for_enable_switch_to_be_turned_on(self):
     findmydevice = Wait(self.marionette, timeout=60).until(
         expected.element_present(*self._findmydevice_locator))
     Wait(self.marionette).until(expected.element_displayed(findmydevice))
     checkbox = Wait(self.marionette, timeout=60).until(
         expected.element_present(*self._checkbox_locator))
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #2
0
 def wait_for_enable_switch_to_be_turned_on(self):
     findmydevice = Wait(self.marionette, timeout=60).until(
         expected.element_present(*self._findmydevice_locator))
     Wait(self.marionette).until(expected.element_displayed(findmydevice))
     checkbox = Wait(self.marionette, timeout=60).until(
         expected.element_present(*self._checkbox_locator))
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #3
0
 def enable_lockscreen(self):
     label = Wait(self.marionette).until(
         expected.element_present(*self._lockscreen_checkbox_locator))
     Wait(self.marionette).until(expected.element_displayed(label))
     label.tap()
     checkbox = label.find_element(By.TAG_NAME, 'input')
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #4
0
 def enable_bluetooth(self):
     self.marionette.find_element(*self._bluetooth_label_locator).tap()
     checkbox = self.marionette.find_element(
         *self._bluetooth_checkbox_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))
     rename_device = self.marionette.find_element(
         *self._rename_my_device_button_locator)
     Wait(self.marionette).until(expected.element_enabled(rename_device))
Пример #5
0
 def select_language(self, language):
     language_locator = (self._select_language_locator[0],
                         self._select_language_locator[1] % language)
     element = Wait(self.marionette).until(
         expected.element_present(*language_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     checkbox = element.find_element(By.TAG_NAME, 'input')
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #6
0
 def select_language(self, language):
     language_locator = (
         self._select_language_locator[0],
         self._select_language_locator[1] % language
     )
     element = Wait(self.marionette).until(
         expected.element_present(*language_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     checkbox = element.find_element(By.TAG_NAME, 'input')
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #7
0
 def test_element_selected_when_not_selected(self):
     self.marionette.navigate(unselected_element)
     el = self.marionette.find_element(By.TAG_NAME, "option")
     unselected = expected.element_selected(el)(self.marionette)
     self.assertFalse(unselected)
Пример #8
0
 def test_element_selected(self):
     self.marionette.navigate(selected_element)
     el = self.marionette.find_element(By.TAG_NAME, "option")
     selected = expected.element_selected(el)(self.marionette)
     self.assertTrue(selected)
Пример #9
0
 def enable_wifi(self):
     self.marionette.find_element(*self._wifi_enabled_label_locator).tap()
     checkbox = self.marionette.find_element(
         *self._wifi_enabled_checkbox_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #10
0
 def enable_visible_to_all(self):
     # Bluetooth state is stored outside the profile bug 969310
     self.marionette.find_element(*self._visible_to_all_label_locator).tap()
     checkbox = self.marionette.find_element(*self._visible_to_all_checkbox_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #11
0
 def enable_bluetooth(self):
     self.marionette.find_element(*self._bluetooth_label_locator).tap()
     checkbox = self.marionette.find_element(*self._bluetooth_checkbox_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))
     rename_device = self.marionette.find_element(*self._rename_my_device_button_locator)
     Wait(self.marionette).until(expected.element_enabled(rename_device))
Пример #12
0
 def enable_gps(self):
     self.marionette.find_element(*self._gps_switch_locator).tap()
     checkbox = self.marionette.find_element(*self._gps_enabled_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #13
0
 def test_element_selected_when_not_selected(self):
     self.marionette.navigate(unselected_element)
     el = self.marionette.find_element(By.TAG_NAME, "option")
     unselected = expected.element_selected(el)(self.marionette)
     self.assertFalse(unselected)
Пример #14
0
 def test_element_selected(self):
     self.marionette.navigate(selected_element)
     el = self.marionette.find_element(By.TAG_NAME, "option")
     selected = expected.element_selected(el)(self.marionette)
     self.assertTrue(selected)
Пример #15
0
 def enable_visible_to_all(self):
     # Bluetooth state is stored outside the profile bug 969310
     self.marionette.find_element(*self._visible_to_all_label_locator).tap()
     checkbox = self.marionette.find_element(
         *self._visible_to_all_checkbox_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #16
0
 def tap_do_not_have_pref_on_tracking(self):
     label = self.marionette.find_element(
         *self._do_not_have_pref_on_tracking_checkbox_locator)
     label.tap()
     radio = label.find_element(By.TAG_NAME, 'input')
     Wait(self.marionette).until(expected.element_selected(radio))
Пример #17
0
 def enable_gps(self):
     self.marionette.find_element(*self._gps_switch_locator).tap()
     checkbox = self.marionette.find_element(*self._gps_enabled_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))
Пример #18
0
 def tap_do_not_have_pref_on_tracking(self):
     label = self.marionette.find_element(
         *self._do_not_have_pref_on_tracking_checkbox_locator)
     label.tap()
     radio = label.find_element(By.TAG_NAME, 'input')
     Wait(self.marionette).until(expected.element_selected(radio))
Пример #19
0
 def enable_wifi(self):
     self.marionette.find_element(*self._wifi_enabled_label_locator).tap()
     checkbox = self.marionette.find_element(*self._wifi_enabled_checkbox_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))