How to use the gaiatest.apps.clock.app.Clock 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 / clock / regions / alarm.py View on Github external
def tap_done(self):
        done = Wait(self.marionette).until(expected.element_present(*self._done_locator))
        Wait(self.marionette).until(expected.element_displayed(done))
        done.tap()
        view = self.marionette.find_element(*self._alarm_view_locator)
        Wait(self.marionette).until(lambda m: view.location['x'] == view.size['width'])
        return Clock(self.marionette)
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / clock / regions / new_alarm.py View on Github external
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import time

from marionette_driver import expected, By, Wait

from gaiatest.apps.clock.app import Clock


class NewAlarm(Clock):

    _alarm_name_locator = (By.ID, 'alarm-name')
    _new_alarm_view_locator = (By.CSS_SELECTOR, 'section[data-panel-id="alarm_edit"]')
    _repeat_menu_locator = (By.ID, 'repeat-menu')
    _sound_menu_locator = (By.ID, 'sound-menu')
    _snooze_menu_locator = (By.ID, 'snooze-menu')
    _done_locator = (By.ID, 'alarm-done')
    _time_button_locator = (By.XPATH, "//li[input[@id='time-select']]")

    def __init__(self, marionette):
        Clock.__init__(self, marionette)
        view = self.marionette.find_element(*self._new_alarm_view_locator)
        Wait(self.marionette).until(lambda m: view.location['x'] == 0 and view.is_displayed())
        # Bug 1032852 This is to bust intermittents caused by this bug that causes keyboard not to appear upon tap
        time.sleep(1.5)
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / clock / regions / new_alarm.py View on Github external
def __init__(self, marionette):
        Clock.__init__(self, marionette)
        view = self.marionette.find_element(*self._new_alarm_view_locator)
        Wait(self.marionette).until(lambda m: view.location['x'] == 0 and view.is_displayed())
        # Bug 1032852 This is to bust intermittents caused by this bug that causes keyboard not to appear upon tap
        time.sleep(1.5)
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / clock / regions / alarm.py View on Github external
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import time

from marionette_driver import expected, By, Wait

from gaiatest.apps.clock.app import Clock


class NewAlarm(Clock):

    _alarm_name_locator = (By.ID, 'alarm-name')
    _repeat_menu_locator = (By.ID, 'repeat-menu')
    _sound_menu_locator = (By.ID, 'sound-menu')
    _snooze_menu_locator = (By.ID, 'snooze-menu')
    _done_locator = (By.ID, 'alarm-done')
    _time_button_locator = (By.XPATH, "//li[input[@id='time-select']]")

    def __init__(self, marionette):
        Clock.__init__(self, marionette)
        view = self.marionette.find_element(*self._alarm_view_locator)
        Wait(self.marionette).until(lambda m: view.location['x'] == 0 and view.is_displayed())
        # Bug 1032852 This is to bust intermittents caused by this bug that causes keyboard not to appear upon tap
        time.sleep(1.5)

    def type_alarm_label(self, value):
github mozilla-b2g / gaia / tests / python / gaia-ui-tests / gaiatest / apps / clock / regions / alarm.py View on Github external
def __init__(self, marionette):
        Clock.__init__(self, marionette)
        view = self.marionette.find_element(*self._alarm_view_locator)
        Wait(self.marionette).until(lambda m: view.location['x'] == 0 and view.is_displayed())
        # Bug 1032852 This is to bust intermittents caused by this bug that causes keyboard not to appear upon tap
        time.sleep(1.5)