Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 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 _tracking_protection_switch(self):
return GaiaBinaryControl(
self.marionette, self.root_element.find_element(*self._tracking_protection_toggle_locator))
def enable_power_save_mode(self):
GaiaBinaryControl(self.marionette, self._power_save_checkbox_locator).enable()
def _usb_checkbox(self):
return GaiaBinaryControl(self.marionette, self._usb_storage_checkbox_locator)
def _order_by_last_name_switch(self):
return GaiaBinaryControl(self.marionette, self._order_by_last_name_switch_locator)
def _hotspot_switch(self):
return GaiaBinaryControl(self.marionette, self._hotspot_switch_locator)