How to use the gaiatest.form_controls.binarycontrol.GaiaBinaryControl function in gaiatest

To help you get started, we’ve selected a few gaiatest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / settings / regions / message.py View on Github external
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)
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / settings / regions / call_settings.py View on Github external
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()
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / settings / regions / message.py View on Github external
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)
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / system / regions / fullscreen_dialog.py View on Github external
def _tracking_protection_switch(self):
        return GaiaBinaryControl(
            self.marionette, self.root_element.find_element(*self._tracking_protection_toggle_locator))
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / settings / regions / battery.py View on Github external
def enable_power_save_mode(self):
        GaiaBinaryControl(self.marionette, self._power_save_checkbox_locator).enable()
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / settings / regions / usb_storage.py View on Github external
def _usb_checkbox(self):
        return GaiaBinaryControl(self.marionette, self._usb_storage_checkbox_locator)
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / contacts / regions / settings_form.py View on Github external
def _order_by_last_name_switch(self):
        return GaiaBinaryControl(self.marionette, self._order_by_last_name_switch_locator)
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / settings / regions / internet_sharing.py View on Github external
def _hotspot_switch(self):
        return GaiaBinaryControl(self.marionette, self._hotspot_switch_locator)