Пример #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 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))
Пример #3
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))
Пример #4
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))
Пример #5
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))
Пример #6
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))
Пример #7
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))
Пример #8
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))
Пример #9
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))
Пример #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_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))
Пример #13
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))