示例#1
0
 def __init__(self, marionette, bolScrollingCheck=True):
     Base.__init__(self, marionette)
     if bolScrollingCheck:
         Wait(self.marionette).until(
             lambda m: self.marionette.find_element(*self._view_locator).get_attribute('class') == 'scrolling')
     Wait(self.marionette).until(
         lambda m: self.marionette.find_element(*self._view_locator).get_attribute('class') != 'scrolling')
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(expected.element_displayed(
         Wait(self.marionette).until(expected.element_present(
             *self._contact_import_picker_frame_locator))))
     select_contacts = self.marionette.find_element(*self._contact_import_picker_frame_locator)
     self.marionette.switch_to_frame(select_contacts)
示例#3
0
    def __init__(self, marionette):
        Base.__init__(self, marionette)

        # there are two type of tiles - main and sub.  There should be at least one main tile
        self.marionette.switch_to_frame(self.marionette.find_element(*self._active_view_locator))
        Wait(self.marionette).until(expected.element_displayed(*self._tile_group_locator))
        self.apps.switch_to_displayed_app()
示例#4
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(
         expected.element_displayed(
             Wait(self.marionette).until(expected.element_present(*self._current_image_locator))
         )
     )
示例#5
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(expected.element_displayed(
         Wait(self.marionette).until(expected.element_present(
             *self._actions_menu_locator))))
     # TODO Difficult intermittent bug 977052
     time.sleep(1)
示例#6
0
文件: google.py 项目: AaskaShah/gaia
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.switch_to_frame()
     # wait for the page to load
     email = Wait(self.marionette).until(
         expected.element_present(*self._email_locator))
     Wait(self.marionette).until(lambda m: email.get_attribute('value') != '')
示例#7
0
    def __init__(self, marionette):
        Base.__init__(self, marionette)
        self.marionette.switch_to_frame()
        Wait(self.marionette).until(expected.element_displayed(*self._hour_picker_locator))

        # TODO: wait for the time picker to fade in Bug 1038186
        time.sleep(2)
示例#8
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(expected.element_displayed(
         Wait(self.marionette).until(expected.element_present(
             *self._crop_view_locator))))
     done = self.marionette.find_element(*self._crop_done_button_locator)
     Wait(self.marionette).until(expected.element_enabled(done))
示例#9
0
文件: passcode_pad.py 项目: 4gh/gaia
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     lockscreen_passcode_pad = self.marionette.find_element(*self._lockscreen_passcode_pad_locator)
     emergency_button = self.marionette.find_element(*self._emergency_button_locator)
     # wait button * 4 rows === the pad's height
     self.wait_for_condition(lambda m: lockscreen_passcode_pad.size['height'] ==
           (4 * emergency_button.size['height']))
示例#10
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_to_be_displayed()
     self.apps.switch_to_displayed_app()
     element = Wait(self.marionette).until(
         expected.element_present(*self._panel_conversationview_locator))
     Wait(self.marionette).until(lambda m: element.rect['x'] == 0 and element.is_displayed())
示例#11
0
    def __init__(self, marionette):
        Base.__init__(self, marionette)
        self.marionette.switch_to_frame()
        self.wait_for_element_displayed(*self._current_element(*self._hour_picker_locator))

        # TODO: wait for the time piker to fade in Bug 1038186
        time.sleep(2)
示例#12
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(lambda m: self.apps.displayed_app.src == self._src)
     self.apps.switch_to_displayed_app()
     loading = self.marionette.find_element(*self._collection_loading_locator)
     Wait(self.marionette).until(expected.element_displayed(loading))
     # See Bug 1162112, Marionette Wait() polling without interval might be interfering network load
     Wait(self.marionette, timeout=30, interval=5).until(expected.element_not_displayed(loading))
示例#13
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.marionette.switch_to_frame()
     self.wait_for_element_present(*self._ff_accounts_frame_locator)
     self.frame = self.marionette.find_element(*self._ff_accounts_frame_locator)
     self.marionette.switch_to_frame(self.frame)
     self.wait_for_element_not_present(*self._body_loading_locator)
     self.wait_for_element_displayed(*self._firefox_logo_locator)
示例#14
0
    def __init__(self, marionette):
        Base.__init__(self, marionette)

        self._switch_to_fxa_iframe()
        input_field = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._email_page_locator))
        Wait(self.marionette).until(expected.element_displayed(input_field))
        Wait(self.marionette).until(lambda m: input_field.rect['x'] == 0)
示例#15
0
    def __init__(self, marionette):
        Base.__init__(self, marionette)

        Wait(self.marionette).until(
            expected.element_displayed(
                Wait(self.marionette).until(expected.element_present(*self._clear_browsing_history_locator))
            )
        )
示例#16
0
    def __init__(self, marionette):
        Base.__init__(self, marionette)
        Wait(self.marionette).until(lambda m: self.apps.displayed_app.name == 'Gallery')
        self.apps.switch_to_displayed_app()

        Wait(self.marionette).until(expected.element_displayed(
            Wait(self.marionette).until(expected.element_present(
                *self._image_locator))))
示例#17
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     from gaiatest.apps.gallery.app import Gallery
     Gallery(self.marionette).wait_to_be_displayed()
     self.apps.switch_to_displayed_app()
     Wait(self.marionette).until(expected.element_displayed(
         Wait(self.marionette).until(expected.element_present(
             *self._image_locator))))
示例#18
0
文件: app.py 项目: Cwiiis/gaia
    def __init__(self, marionette):
        Base.__init__(self, marionette)
        self.wait_to_be_displayed()
        self.apps.switch_to_displayed_app()

        if self.is_element_present(*self._page_locator):
            Wait(marionette).until(lambda m: self.marionette.find_element(*self._page_locator).
                                   get_attribute('data-ready') == 'true')
示例#19
0
文件: activities.py 项目: axraf/gaia
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.marionette.switch_to_frame()
     view = self.marionette.find_element(*self._actions_menu_locator)
     if 'contextmenu' in view.get_attribute('class'):
         # final position is below the status bar
         self.wait_for_condition(lambda m: view.location['y'] == 20)
     else:
         self.wait_for_condition(lambda m: view.location['y'] == 0)
示例#20
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(
         expected.element_displayed(
             Wait(self.marionette).until(expected.element_present(*self._current_image_locator))
         )
     )
     Wait(self.marionette).until(
         lambda m: self.marionette.find_element(*self._current_image_locator).get_attribute("src") != ""
     )
示例#21
0
文件: merge.py 项目: nullaus/gaia
    def __init__(self, marionette):
        Base.__init__(self, marionette)
        marionette.switch_to_frame()

        merge_iframe = Wait(marionette).until(expected.element_present(*self._iframe_locator))
        Wait(marionette).until(expected.element_displayed(merge_iframe))
        marionette.switch_to_frame(merge_iframe)

        body = marionette.find_element(*self._body_locator)
        Wait(marionette).until(lambda m: body.rect["y"] == 0)
示例#22
0
文件: google.py 项目: 4gh/gaia
    def __init__(self, marionette):
        Base.__init__(self, marionette)

        # wait for the pop up screen to open
        view = self.wait_for_element_present(*self._iframe_locator)
        self.marionette.switch_to_frame(view)

        # wait for the page to load
        email = self.wait_for_element_present(*self._email_locator)
        self.wait_for_condition(lambda m: email.get_attribute('value') != '')
示例#23
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(expected.element_displayed(
         Wait(self.marionette).until(expected.element_present(
             *self._edit_preview_canvas_locator))))
     # I have tried waiting for all the elements in the UI, but the crash
     # still occurs so the only solution I found was the hardcoded sleep - Bug 1111981
     time.sleep(3)
     done = self.marionette.find_element(*self._crop_done_button_locator)
     Wait(self.marionette).until(expected.element_enabled(done))
示例#24
0
文件: google.py 项目: hharchani/gaia
    def __init__(self, marionette):
        Base.__init__(self, marionette)

        # wait for the pop up screen to open
        view = Wait(self.marionette).until(expected.element_present(*self._iframe_locator))
        self.marionette.switch_to_frame(view)

        # wait for the page to load
        email = Wait(self.marionette).until(expected.element_present(*self._email_locator))
        Wait(self.marionette).until(lambda m: email.get_attribute("value") != "")
示例#25
0
文件: settings.py 项目: Anirudh0/gaia
    def __init__(self, marionette):
        Base.__init__(self, marionette)
        # go into iframe of usage app settings
        frame = Wait(self.marionette).until(expected.element_present(
            *self._settings_iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(frame))
        self.marionette.switch_to_frame(frame)

        Wait(self.marionette).until(expected.element_displayed(
            Wait(self.marionette).until(expected.element_present(
                *self._settings_title_locator))))
示例#26
0
    def __init__(self, marionette):
        Base.__init__(self, marionette)
        self.marionette.switch_to_frame()

        # wait for the pop up screen to open
        view = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(view))

        # Change the app to make use of the Facebook developer appId
        Wait(self.marionette, timeout=60).until(lambda m: view.get_attribute('data-url') != 'about:blank')

        # Desktop b2g uses this
        str = view.get_attribute('data-url').replace('123456', '323630664378726')
        # Device uses this
        str = str.replace('395559767228801', '323630664378726')

        self.marionette.switch_to_frame(view)
        # Wait until the original page has loaded a bit, because sometimes,
        # trying to load the 2nd page directly after the first, causes a blank page
        Wait(self.marionette, timeout=60).until(expected.element_present(*self._div_locator))
        self.marionette.navigate(str)
        Wait(self.marionette, timeout=60).until(expected.element_present(*self._email_locator))
示例#27
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.marionette.switch_to_frame()
     view = self.marionette.find_element(*self._actions_menu_locator)
     Wait(self.marionette).until(lambda m: view.location['y'] == 0)
示例#28
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_element_displayed(*self._apply_locator)
示例#29
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(
         expected.element_displayed(*self._security_selector_locator))
示例#30
0
 def __init__(self, marionette, app_name=False):
     Base.__init__(self, marionette)
     if app_name:
         self.name = app_name
示例#31
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_element_not_present(
         *self._search_results_loading_locator)
示例#32
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_element_displayed(*self._current_image_locator)
示例#33
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_element_displayed(*self._actions_menu_locator)
     # TODO Difficult intermittent bug 977052
     time.sleep(1)
示例#34
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_condition(lambda m: m.find_element(
         *self._cell_data_prompt_container_locator).location['x'] == 0)
示例#35
0
文件: app.py 项目: kuoe0/gaia-dev
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.name = UI_TESTS
示例#36
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.data_layer = GaiaData(self.marionette)
示例#37
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_settings_close_button_to_load()
示例#38
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     view = self.marionette.find_element(*self._settings_view_locator)
     Wait(self.marionette).until(lambda m: view.location['y'] == 0)
示例#39
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     # go into iframe of usage app settings
     self.wait_for_element_displayed(*self._settings_iframe_locator)
     self.marionette.switch_to_frame(self.marionette.find_element(*self._settings_iframe_locator))
     self.wait_for_element_displayed(*self._settings_title_locator)
示例#40
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_element_displayed(*self._fullscreen_view_locator)
示例#41
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     element = self.marionette.find_element(
         *self._carrier_container_locator)
     Wait(self.marionette).until(
         lambda m: 'current' in element.get_attribute('class'))
示例#42
0
文件: keypad.py 项目: kuoe0/gaia-dev
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     form = self.marionette.find_element(*self._form_locator)
     Wait(self.marionette).until(lambda m: form.location['y'] == 0)
示例#43
0
文件: keyboard.py 项目: philsmd/gaia
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     section = self.marionette.find_element(*self._section_locator)
     self.wait_for_condition(lambda m: section.location['x'] == 0)
示例#44
0
 def __init__(self, marionette, element, index):
     self.root_element = element
     # Save the index of the element so we can match it to the js files object
     self.index = index
     Base.__init__(self, marionette)
示例#45
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(
         expected.element_displayed(*self._crash_report_info_locator))
示例#46
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     el = self.marionette.find_element(*self._details_header_locator)
     Wait(self.marionette).until(
         lambda m: el.location['x'] == 0 and el.is_displayed())
示例#47
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(
         expected.element_displayed(*self._os_version_locator))
示例#48
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_element_displayed(*self._music_size_locator)
     self.wait_for_element_displayed(*self._pictures_size_locator)
     self.wait_for_element_displayed(*self._movies_size_locator)
示例#49
0
    def __init__(self, marionette):
        Base.__init__(self, marionette)

        Wait(self.marionette).until(
            expected.element_displayed(*self._clear_browsing_history_locator))
示例#50
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(expected.element_displayed(*self._internal_storage_header_locator))
     Wait(self.marionette).until(expected.element_displayed(*self._external_storage_header_locator))
示例#51
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self._set_active_view('artist')
     self.wait_sublist_view_draw()
示例#52
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_add_edit_contact_to_load()
示例#53
0
文件: new_message.py 项目: enwin/gaia
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(lambda m: self.apps.displayed_app.name == self.name)
     self.apps.switch_to_displayed_app()
     section = self.marionette.find_element(*self._thread_messages_locator)
     Wait(self.marionette).until(lambda m: section.location['x'] == 0)
示例#54
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(
         lambda m: self.apps.displayed_app.name == self.name)
     self.apps.switch_to_displayed_app()
示例#55
0
文件: device_info.py 项目: 6a68/gaia
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_element_displayed(*self._phone_number_locator)
示例#56
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
示例#57
0
文件: app.py 项目: mmalecki/gaia
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.marionette.switch_to_frame()
     self.wait_for_element_present(*self._persona_frame_locator)
示例#58
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_condition(lambda m: m.find_element(*self._welcome_title_locator).location['x'] == 0)
示例#59
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.wait_for_element_displayed(*self._save_locator)
示例#60
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     self.marionette.switch_to_frame()
     self.wait_for_element_displayed(*self._actions_menu_locator)