def select_sim_1(self): element = self.marionette.find_element(*self._sim_1_selector_locator) Wait(self.marionette).until(expected.element_displayed(element)) element.tap() Wait(self.marionette).until(expected.element_displayed(*self._sim_1_settings_page_locator)) # Check whether Cell Broadcast is enabled. If so, wait until the switch transition is complete # for the emergency alert switch as well cell_broadcast_switch = GaiaBinaryControl(self.marionette, self._cell_broadcast_switch_locator) if cell_broadcast_switch.is_checked: emerg_alert_switch = GaiaBinaryControl(self.marionette, self._emerg_alert_switch_locator) Wait(self.marionette).until(lambda m: emerg_alert_switch.is_checked)
def enable_fixed_dialing(self): GaiaBinaryControl(self.marionette, self._toggle_fixed_dialing_number_locator).enable() Wait(self.marionette).until( expected.element_displayed(*self._sim_pin_area_locator)) self.marionette.switch_to_frame() Wait(self.marionette).until( lambda m: self.keyboard.is_keyboard_displayed) self.apps.switch_to_displayed_app()
def _is_visible_switch(self): return GaiaBinaryControl(self.marionette, self._visible_to_all_checkbox_locator)
def is_roaming_toggle_checked(self): return GaiaBinaryControl(self.marionette, self._data_roaming_enabled_input_locator).is_checked
def _bluetooth_switch(self): return GaiaBinaryControl(self.marionette, self._bluetooth_checkbox_locator)
def select_language(self, language): language_locator = (self._select_language_locator[0], self._select_language_locator[1] % language) GaiaBinaryControl(self.marionette, language_locator).enable()
def _usb_checkbox(self): return GaiaBinaryControl(self.marionette, self._usb_storage_checkbox_locator)
def _share_data_switch(self): return GaiaBinaryControl(self.marionette, self._statistic_checkbox_locator)
def _default_format_switch(self): return GaiaBinaryControl(self.marionette, self._use_default_switch_locator)
def _airplane_checkbox(self): return GaiaBinaryControl(self.marionette, self._airplane_switch_locator)
def _gps_checkbox(self): return GaiaBinaryControl(self.marionette, self._gps_switch_locator)
def _metrics_none_radio(self): return GaiaBinaryControl(self.marionette, self._metrics_none_locator)
def enable_power_save_mode(self): GaiaBinaryControl(self.marionette, self._power_save_checkbox_locator).enable()
def enable_set_ice_contact(self): GaiaBinaryControl(self.marionette, self._toggle_locator).enable() return SetIceContacts(self.marionette)
def _hotspot_switch(self): return GaiaBinaryControl(self.marionette, self._hotspot_switch_locator)
def _lockscreen_switch(self): return GaiaBinaryControl(self.marionette, self._lockscreen_checkbox_locator)
def _checkbox(self): return GaiaBinaryControl(self.marionette, self._state_toggle_locator)
def _wifi_switch(self): return GaiaBinaryControl(self.marionette, self._wifi_enabled_checkbox_locator)
def _geolocation_switch(self): return GaiaBinaryControl(self.marionette, self._enable_geolocation_checkbox_locator)
def tap_disallow_tracking(self): GaiaBinaryControl(self.marionette, self._disallow_tracking_radio_locator).enable()
def _tracking_protection_switch(self): return GaiaBinaryControl( self.marionette, self.root_element.find_element( *self._tracking_protection_toggle_locator))
def _wifi_tracking_switch(self): return GaiaBinaryControl(self.marionette, self._wifi_data_tracking_locator)
def wait_for_enable_switch_to_be_turned_on(self): Wait(self.marionette, timeout=60).until( expected.element_displayed(*self._checkbox_locator)) Wait(self.marionette).until(lambda m: GaiaBinaryControl( m, self._checkbox_locator).is_checked is True)
def enable_data_alert_switch(self): GaiaBinaryControl(self.marionette, self._data_alert_switch_locator).enable()
def tap_do_not_have_pref_on_tracking(self): GaiaBinaryControl(self.marionette, self._do_not_have_pref_on_tracking_radio_locator).enable()
def is_data_alert_switch_checked(self): return GaiaBinaryControl(self.marionette, self._data_alert_switch_locator).is_checked
def _order_by_last_name_switch(self): return GaiaBinaryControl(self.marionette, self._order_by_last_name_switch_locator)
def _data_alert_switch(self): return GaiaBinaryControl(self.marionette, self._data_alert_switch_locator)