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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))