当前位置: 首页>>代码示例>>Python>>正文


Python GaiaImageCompareTestCase.scroll方法代码示例

本文整理汇总了Python中gaiatest.gaia_graphics_test.GaiaImageCompareTestCase.scroll方法的典型用法代码示例。如果您正苦于以下问题:Python GaiaImageCompareTestCase.scroll方法的具体用法?Python GaiaImageCompareTestCase.scroll怎么用?Python GaiaImageCompareTestCase.scroll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gaiatest.gaia_graphics_test.GaiaImageCompareTestCase的用法示例。


在下文中一共展示了GaiaImageCompareTestCase.scroll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: orientation_zoom_check

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def orientation_zoom_check(self):

        self.push_resource(self.images, count=self.image_count)

        self.take_screenshot()
        # flick image, change orientation, pinch zoom, change orientation
        # launch gallery, load image.
        gallery = Gallery(self.marionette)
        gallery.launch()
        gallery.wait_for_files_to_load(self.image_count)

        self.assertEqual(gallery.gallery_items_number, self.image_count)

        # Tap first image to open full screen view.
        image = gallery.tap_first_gallery_item()
        self.assertIsNotNone(image.current_image_source)
        self.assertTrue(image.is_photo_toolbar_displayed)

        # scroll back and forth in different display mode
        self.change_orientation('landscape-primary')
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'right',
                                        400, locator=image._current_image_locator)

        self.change_orientation('portrait-primary')
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'left',
                                        400, locator=image._current_image_locator)

        # flip A LOT
        for x in range(0, 4):
            self.change_orientation('landscape-primary')
            self.change_orientation('portrait-primary')
        self.take_screenshot()

        # do pinch zoom while flipping the phone
        GaiaImageCompareTestCase.pinch(self.marionette, image._current_frame_locator, 'in', 20)

        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'right',
                                        300, locator=image._current_image_locator)
        self.take_screenshot()
        self.change_orientation('landscape-primary')
        GaiaImageCompareTestCase.pinch(self.marionette, image._current_frame_locator, 'out', 50)
        self.take_screenshot()
        self.change_orientation('portrait-primary')

        image.double_tap_image()
        self.take_screenshot(prewait=3) #takes time for zoom-in action to complete

        # go back and forth with flicking then exit gallery app
        GaiaImageCompareTestCase.scroll(self.marionette, 'right',
                                        150, locator=image._current_frame_locator)

        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'left',
                                        150, locator=image._current_frame_locator)
        self.take_screenshot()
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:60,代码来源:orientation_zoom_base.py

示例2: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self):

        settings = Settings(self.marionette)
        settings.launch()

        self.take_screenshot('main')
        for i in range(0, 4):
            GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                            settings.screen_element.size['height'], screen = settings.screen_element)
            self.take_screenshot('main')
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:12,代码来源:test_settings_RTL_Main_View.py

示例3: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self, options):
        settings = Settings(self.marionette)
        settings.launch()
        ########### USB Storage #############################
        usb_storage = settings.open_usb_storage()
        usb_storage.enable_usb_storage()
        self.take_screenshot('usbstorage-enablewarning')
        # if usb is enabled, it affects media storage menu
        if options == "disable":
            usb_storage.cancel_usb_storage()
            self.assertFalse(usb_storage.enabled)
            self.take_screenshot('usbstorage')
        else:
            usb_storage.confirm_usb_storage()
            self.assertTrue(usb_storage.enabled)
            self.take_screenshot('usbstorage')

        settings.return_to_prev_menu(settings.screen_element, usb_storage.screen_element)

        ########### Media Storage #############################
        # when USB is enabled, need to capture the 'Not Available' text
        mediastorage_page = settings.open_media_storage()
        self.take_screenshot('media_storage')

        if options == "disable":
            mediastorage_page.internal_storage.tap_format()
            self.take_screenshot('media_storage-format_internal')
            mediastorage_page.internal_storage.cancel_format()

            GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                            mediastorage_page.screen_element.size['height'],
                                            screen = mediastorage_page.screen_element)
            self.take_screenshot('media_storage')
            mediastorage_page.external_storage0.tap_format()
            self.take_screenshot('media_storage-format_SD')
            mediastorage_page.external_storage0.cancel_format()
            mediastorage_page.external_storage0.tap_eject()
            self.take_screenshot('media_storage-eject_SD')
            mediastorage_page.external_storage0.cancel_eject()

            GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                            mediastorage_page.screen_element.size['height'],
                                            screen = mediastorage_page.screen_element)
            self.take_screenshot('media_storage')
            mediastorage_page.tap_select_media_location()
            self.take_screenshot('media_storage-select_media_loc')
            mediastorage_page.confirm_select_media_location()
            self.take_screenshot('media_storage-media_locations', top_frame=True)
            mediastorage_page.pick_media_location('Internal')
            settings.return_to_prev_menu(settings.screen_element, mediastorage_page.screen_element)

        ########### Application Storage #############################
            settings.open_application_storage()
            self.take_screenshot('application_storage')
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:56,代码来源:test_settings_storage_RTL.py

示例4: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self):

        settings = Settings(self.marionette)
        settings.launch()

        ###################### Device Information and its sub pages ######################
        device_info_page = settings.open_device_info()
        self.take_screenshot('dev_info')
        GaiaImageCompareTestCase.scroll(self.marionette, 'down', device_info_page.screen_element.size['height'],
                                        screen = device_info_page.screen_element)
        self.take_screenshot('dev_info')

        moreinfo_page = device_info_page.tap_more_info()
        self.take_screenshot('dev_info-more_info')
        GaiaImageCompareTestCase.scroll(self.marionette, 'down', device_info_page.screen_element.size['height'],
                                        screen = moreinfo_page.screen)
        self.take_screenshot('dev_info-more_info')
        settings.return_to_prev_menu(device_info_page.screen_element)

        device_info_page.tap_reset_phone()
        self.take_screenshot('dev_info-reset')
        device_info_page.confirm_reset(False)

        device_info_page.tap_update_frequency()
        self.take_screenshot('dev_info-update-freq')
        device_info_page.exit_update_frequency()
        settings.return_to_prev_menu(settings.screen_element)

        ### Downloads page
        settings.open_downloads()
        self.take_screenshot('downloads')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_battery()
        self.take_screenshot('battery')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_accessibility()
        self.take_screenshot('accessibility')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_developer()
        self.take_screenshot('developer')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_improve()
        self.take_screenshot('improve')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_help()
        self.take_screenshot('help')
        settings.return_to_prev_menu(settings.screen_element)
开发者ID:RobinvanKaathoven,项目名称:gaia,代码行数:54,代码来源:test_settings_device_RTL.py

示例5: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self):

        settings = Settings(self.marionette)
        settings.launch()

        ################## Screen Lock ######################
        screenlock_page = settings.open_screen_lock()
        screenlock_page.enable_lockscreen()
        self.take_screenshot('screen_lock')
        screenlock_page.enable_passcode_lock()
        self.take_screenshot('screen_lock-passcode')
        settings.return_to_prev_menu(screenlock_page.screen_element, screenlock_page.passcode_screen_element)
        settings.return_to_prev_menu(settings.screen_element, screenlock_page.screen_element)

        ################## App Permission ######################
        permission_page = settings.open_app_permissions()
        self.take_screenshot('app_permissions')
        permission_page.tap_camera_app()
        self.take_screenshot('app_permissions-app_list')
        permission_page.tap_geolocation_selection()
        self.take_screenshot('app_permissions-geoloc_option',top_frame=True)
        permission_page.exit_geolocation_selection()
        settings.return_to_prev_menu(permission_page.screen_element, permission_page.details_screen_element)
        settings.return_to_prev_menu(settings.screen_element, permission_page.screen_element)

        ################## Do Not Track ######################
        dnt_page = settings.open_do_not_track()
        self.take_screenshot('do_not_track')
        GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                        settings.screen_element.size['height'], screen = dnt_page.screen_element)
        self.take_screenshot('do_not_track')
        settings.return_to_prev_menu(settings.screen_element, dnt_page.screen_element)

        ################## Browsing Privacy ######################
        browsingprivacy_page = settings.open_browsing_privacy()
        self.take_screenshot('browsing_privacy')
        confirm_dialog = browsingprivacy_page.clear_browsing_history()
        self.take_screenshot('browsing_privacy-history')
        confirm_dialog.refresh_root_element()
        confirm_dialog.cancel_clear()
        GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                        settings.screen_element.size['height'],
                                        screen = browsingprivacy_page.screen_element)
        self.take_screenshot('browsing_privacy')
        confirm_dialog = browsingprivacy_page.clear_private_data()
        self.take_screenshot('browsing_privacy-data')
        confirm_dialog.refresh_root_element()
        confirm_dialog.cancel_clear()
        settings.return_to_prev_menu(settings.screen_element, browsingprivacy_page.screen_element)
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:51,代码来源:test_settings_PS_RTL.py

示例6: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self, options):
        settings = Settings(self.marionette)
        settings.launch()
        ########### USB Storage #############################
        settings.enable_usb_storage()
        self.take_screenshot("usbstorage-enablewarning")
        # if usb is enabled, it affects media storage menu
        if options == "disable":
            settings.cancel_usb_storage()
            self.assertFalse(settings.is_usb_storage_enabled)
            usbstorage_page = settings.open_usb_storage()
            self.take_screenshot("usbstorage")
            settings.return_to_prev_menu(settings.screen_element, usbstorage_page.screen_element)
        else:
            settings.confirm_usb_storage()
            self.assertTrue(settings.is_usb_storage_enabled)

        ########### Media Storage #############################
        # when USB is enabled, need to capture the 'Not Available' text
        mediastorage_page = settings.open_media_storage()
        self.take_screenshot("media_storage")
        for i in range(0, 2):
            GaiaImageCompareTestCase.scroll(
                self.marionette,
                "down",
                mediastorage_page.screen_element.size["height"],
                screen=mediastorage_page.screen_element,
            )
            self.take_screenshot("media_storage")

        if options == "disable":
            mediastorage_page.internal_storage.tap_format()
            self.take_screenshot("media_storage-format_internal")
            mediastorage_page.internal_storage.cancel_format()
            mediastorage_page.external_storage0.tap_format()
            self.take_screenshot("media_storage-format_SD")
            mediastorage_page.external_storage0.cancel_format()
            mediastorage_page.tap_select_media_location()
            self.take_screenshot("media_storage-select_media_loc")
            mediastorage_page.confirm_select_media_location()
            self.take_screenshot("media_storage-media_locations")
            mediastorage_page.pick_media_location("Internal")
            settings.return_to_prev_menu(settings.screen_element, mediastorage_page.screen_element)

            ########### Application Storage #############################
            settings.open_application_storage()
            self.take_screenshot("application_storage")
开发者ID:rockwyc992,项目名称:gaia,代码行数:49,代码来源:test_settings_storage_RTL.py

示例7: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self):

        settings = Settings(self.marionette)
        settings.launch()

        # opening each subpage in Settings menu.  Privacy Control is not opened, because it is a separate app
        #some subpages have their own subpages, and they need to be opened as well.
        settings.open_wifi()
        self.take_screenshot('wifi')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_sim_manager()
        self.take_screenshot('sim_manager')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_call()
        self.take_screenshot('call')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_message()
        self.take_screenshot('message')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_cell_and_data()
        self.take_screenshot('cell_and_data')
        settings.return_to_prev_menu(settings.screen_element)

        settings.open_bluetooth()
        self.take_screenshot('bluetooth')
        settings.return_to_prev_menu(settings.screen_element)

        ##################### Internet sharing and its subpages ######################
        internet_settings_page = settings.open_internet_sharing()
        self.take_screenshot('internet_sharing')
        GaiaImageCompareTestCase.scroll(self.marionette, 'down', internet_settings_page.screen_element.size['height'],
                                        screen = internet_settings_page.screen_element)

        self.take_screenshot('internet_sharing')
        hotspot_page = internet_settings_page.tap_hotspot_settings()
        self.take_screenshot('internet_sharing-hotspot')
        hotspot_page.tap_security_settings()
        self.take_screenshot('internet_sharing-hotspot-security')
        hotspot_page.confirm_security_settings()
        settings.return_to_prev_menu(internet_settings_page.screen_element)
        settings.return_to_prev_menu(settings.screen_element)
开发者ID:arroway,项目名称:gaia,代码行数:47,代码来源:test_settings_NC_RTL.py

示例8: test_browser_navigation

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_browser_navigation(self):

        self.test_url = self.marionette.absolute_url("sample_websites/darkness/index.html")

        search = Search(self.marionette)
        search.launch()
        browser = search.go_to_url(self.test_url)
        browser.wait_for_page_to_load()

        # TODO: remove the reloading and rechecking for elements when bug 1128034 is resolved,
        browser.tap_reload_button()
        browser.wait_for_page_to_load()
        browser.switch_to_content()
        Wait(self.marionette).until(lambda m: "Darkness" == m.title)
        Wait(self.marionette).until(lambda m: m.find_element(*self._academic_page_locator).is_displayed())
        self.take_screenshot()

        self.marionette.switch_to_frame()
        GaiaImageCompareTestCase.scroll(self.marionette, "down", 400, locator=browser._browser_frame_locator)

        self.take_screenshot()
开发者ID:nullaus,项目名称:gaia,代码行数:23,代码来源:test_browser_navigation.py

示例9: test_install_and_execute_bing_map

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_install_and_execute_bing_map(self):

        marketplace = Marketplace(self.marionette)
        marketplace.launch()

        results = marketplace.search(self.app_search)
        first_result = results.search_results[0]
        first_result.tap_install_button()
        confirm_install = ConfirmInstall(self.marionette)
        confirm_install.tap_confirm()

        results = marketplace.get_current_displayed_result()
        first_result = results.search_results[0]
        first_result.tap_open_app_button(self._map_locator)

        self.take_screenshot(prewait=self.draw_wait_time)
        self.marionette.find_element(*self._zoom_in_locator).tap()
        self.take_screenshot(prewait=self.draw_wait_time)
        self.marionette.find_element(*self._zoom_in_locator).tap()
        self.take_screenshot(prewait=self.draw_wait_time)
        self.marionette.find_element(*self._zoom_in_locator).tap()
        self.take_screenshot(prewait=self.draw_wait_time)

        # move around
        GaiaImageCompareTestCase.scroll(self.marionette, 'right',
                                        100, locator=self._map_locator)

        self.take_screenshot(prewait=self.draw_wait_time)
        GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                        100, locator=self._map_locator)

        self.take_screenshot(prewait=self.draw_wait_time)

        # zoom out
        self.marionette.find_element(*self._zoom_out_locator).tap()
        self.take_screenshot(prewait=self.draw_wait_time)
        self.marionette.find_element(*self._zoom_out_locator).tap()
        self.take_screenshot(prewait=self.draw_wait_time)
        self.marionette.find_element(*self._zoom_out_locator).tap()
        self.take_screenshot(prewait=self.draw_wait_time)
开发者ID:Cwiiis,项目名称:gaia,代码行数:42,代码来源:test_marketplace_download_execute_map_app.py

示例10: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self, options):
        settings = Settings(self.marionette)
        settings.launch()
        ########### USB Storage #############################
        settings.wait_for_usb_storage_toggle_ready()
        settings.toggle_usb_storage()
        self.take_screenshot('usbstorage-enablewarning')
        # if usb is enabled, it affects media storage menu
        if options == "disable":
            settings.cancel_usb_storage()
        else:
            settings.confirm_usb_storage()

        ########### Media Storage #############################
        # when USB is enabled, need to capture the 'Not Available' text
        mediastorage_page = settings.open_media_storage()
        self.take_screenshot('media_storage')
        for i in range(0, 2):
            GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                            mediastorage_page.screen_element.size['height'],
                                            screen=mediastorage_page.screen_element)
            self.take_screenshot('media_storage')

        if options == "disable":
            mediastorage_page.tap_format_internal_storage()
            self.take_screenshot('media_storage-format_internal')
            mediastorage_page.cancel_format_storage()
            mediastorage_page.tap_format_SD()
            self.take_screenshot('media_storage-format_SD')
            mediastorage_page.cancel_format_storage()
            mediastorage_page.tap_select_media_location()
            self.take_screenshot('media_storage-select_media_loc')
            mediastorage_page.confirm_select_media_location()
            self.take_screenshot('media_storage-media_locations')
            mediastorage_page.pick_media_location('Internal')
            settings.return_to_prev_menu(settings.screen_element)

        ########### Application Storage #############################
            settings.open_application_storage()
            self.take_screenshot('application_storage')
开发者ID:tedders1,项目名称:gaia,代码行数:42,代码来源:test_settings_storage_RTL.py

示例11: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self):

        settings = Settings(self.marionette)
        settings.launch()

        #################### Sound ######################
        sound_page = settings.open_sound()
        self.take_screenshot('sound')
        GaiaImageCompareTestCase.scroll(self.marionette, 'down', sound_page.screen_element.size['height'],
                                        screen=sound_page.screen_element)
        self.take_screenshot('sound')
        ringtone_page = sound_page.tap_ring_tone_selector()
        self.take_screenshot('sound-ringtones')
        for i in range(0, 5):
            GaiaImageCompareTestCase.scroll(self.marionette, 'down', ringtone_page.screen_element.size['height'],
                                            screen=ringtone_page.screen_element)
            self.take_screenshot('sound-ringtones')

        ringtone_page.tap_exit()
        settings.switch_to_settings_app()
        Wait(self.marionette).until(lambda m: sound_page.ring_tone_selector_visible)

        alerts_page = sound_page.tap_alerts_selector()
        self.take_screenshot('sound-alerts')
        for i in range(0, 5):
            GaiaImageCompareTestCase.scroll(self.marionette, 'down', alerts_page.screen_element.size['height'],
                                            screen=alerts_page.screen_element)
            self.take_screenshot('sound-alerts')
        alerts_page.tap_exit()
        settings.switch_to_settings_app()
        Wait(self.marionette).until(lambda m: sound_page.ring_tone_selector_visible)

        manage_page = sound_page.tap_manage_tones_selector()
        self.take_screenshot('sound-manage_tones')
        for i in range(0, 5):
            GaiaImageCompareTestCase.scroll(self.marionette, 'down', manage_page.screen_element.size['height'],
                                            screen=manage_page.screen_element)
            self.take_screenshot('sound-manage_tones')

        manage_page.ring_tones[1].select_option()
        self.take_screenshot('sound-manage_tones-share')
        manage_page.cancel_share()
        manage_page.tap_exit()
        settings.switch_to_settings_app()
        Wait(self.marionette).until(lambda m: sound_page.ring_tone_selector_visible)
        settings.return_to_prev_menu(settings.screen_element, sound_page.screen_element)

        #################### Display ######################
        display_page = settings.open_display()
        self.take_screenshot('display')
        display_page.tap_timeout_selector()
        self.take_screenshot('display-timeout_values', top_frame=True)
        display_page.tap_timeout_confirmation()
        settings.return_to_prev_menu(settings.screen_element, display_page.screen_element)

        #################### Homescreen ######################
        homescreen_page = settings.open_homescreen()
        self.take_screenshot('homescreen')

        homescreen_page.open_change_home_screen()
        self.take_screenshot('homescreen-change_homescreen')
        homescreen_page.open_get_more_home_screen()
        self.take_screenshot('homescreen-get_more_homescreen',top_frame=True)
        homescreen_page.cancel_get_more_home_screen()
        settings.return_to_prev_menu(homescreen_page.screen_element,
                                     homescreen_page.change_homescreen_screen_element)
        settings.return_to_prev_menu(settings.screen_element, homescreen_page.screen_element)

        ################### Search ######################
        search_page = settings.open_search()
        self.take_screenshot('search')
        search_page.open_select_search_engine()
        self.take_screenshot('search-engine_list')
        search_page.close_select_search_engine()
        settings.return_to_prev_menu(settings.screen_element, search_page.screen_element)

        ################## Navigation ######################
        nav_page = settings.open_navigation()
        self.take_screenshot('navigation')
        settings.return_to_prev_menu(settings.screen_element, nav_page.screen_element)

        ################# Notifications ######################
        notif_page = settings.open_notification()
        self.take_screenshot('notification')
        settings.return_to_prev_menu(settings.screen_element, notif_page.screen_element)

        ################ Date and Time ######################
        # Only the main page and Time Format selection is checked
        date_time_page = settings.open_date_and_time()
        self.take_screenshot('date_and_time')
        GaiaImageCompareTestCase.scroll(self.marionette, 'down', date_time_page.screen_element.size['height'],
                                        screen=date_time_page.screen_element)
        self.take_screenshot('date_and_time')
        date_time_page.disable_default_format()
        date_time_page.open_time_format()
        self.take_screenshot('date_and_time-time_format',top_frame=True)
        date_time_page.close_time_format()
        settings.return_to_prev_menu(settings.screen_element, date_time_page.screen_element)

        ############### Language ######################
#.........这里部分代码省略.........
开发者ID:anubhav7495,项目名称:gaia,代码行数:103,代码来源:test_settings_personalization_RTL.py

示例12: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self):

        settings = Settings(self.marionette)
        settings.launch()

        #################### Sound ######################
        sound_page = settings.open_sound()
        self.take_screenshot("sound")
        GaiaImageCompareTestCase.scroll(
            self.marionette, "down", sound_page.screen_element.size["height"], screen=sound_page.screen_element
        )
        self.take_screenshot("sound")
        ringtone_page = sound_page.tap_ring_tone_selector()

        self.take_screenshot("sound-ringtones")
        for i in range(0, 5):
            GaiaImageCompareTestCase.scroll(
                self.marionette,
                "down",
                ringtone_page.screen_element.size["height"],
                screen=ringtone_page.screen_element,
            )
            self.take_screenshot("sound-ringtones")

        ringtone_page.tap_exit()
        settings.switch_to_settings_app()
        Wait(self.marionette).until(lambda m: sound_page.ring_tone_selector_visible)

        alerts_page = sound_page.tap_alerts_selector()
        self.take_screenshot("sound-alerts")
        for i in range(0, 5):
            GaiaImageCompareTestCase.scroll(
                self.marionette, "down", alerts_page.screen_element.size["height"], screen=alerts_page.screen_element
            )
            self.take_screenshot("sound-alerts")
        alerts_page.tap_exit()
        settings.switch_to_settings_app()
        Wait(self.marionette).until(lambda m: sound_page.ring_tone_selector_visible)

        manage_page = sound_page.tap_manage_tones_selector()
        self.take_screenshot("sound-manage_tones")
        for i in range(0, 5):
            GaiaImageCompareTestCase.scroll(
                self.marionette, "down", manage_page.screen_element.size["height"], screen=manage_page.screen_element
            )
            self.take_screenshot("sound-manage_tones")

        manage_page.ring_tones[1].select_option()
        self.take_screenshot("sound-manage_tones-share")
        manage_page.cancel_share()
        manage_page.tap_exit()
        settings.switch_to_settings_app()
        Wait(self.marionette).until(lambda m: sound_page.ring_tone_selector_visible)
        settings.return_to_prev_menu(settings.screen_element, sound_page.screen_element)

        #################### Display ######################
        display_page = settings.open_display()
        self.take_screenshot("display")
        display_page.pick_wallpaper()
        self.take_screenshot("display-wallpaper_pick")
        display_page.cancel_pick_wallpaper()
        display_page.tap_timeout_selector()
        self.take_screenshot("display-timeout_values")
        display_page.tap_timeout_confirmation()
        settings.return_to_prev_menu(settings.screen_element, display_page.screen_element)

        #################### Homescreen ######################
        homescreen_page = settings.open_homescreen()
        self.take_screenshot("homescreen")
        homescreen_page.open_select_icon_layout()
        self.take_screenshot("homescreen-layout")
        homescreen_page.open_select_icon_layout()
        settings.return_to_prev_menu(settings.screen_element, homescreen_page.screen_element)

        ################### Search ######################
        search_page = settings.open_search()
        self.take_screenshot("search")
        search_page.open_select_search_engine()
        self.take_screenshot("search-engine_list")
        search_page.close_select_search_engine()
        settings.return_to_prev_menu(settings.screen_element, search_page.screen_element)

        ################## Navigation ######################
        nav_page = settings.open_navigation()
        self.take_screenshot("navigation")
        settings.return_to_prev_menu(settings.screen_element, nav_page.screen_element)

        ################# Notifications ######################
        notif_page = settings.open_notification()
        self.take_screenshot("notification")
        settings.return_to_prev_menu(settings.screen_element, notif_page.screen_element)

        ################ Date and Time ######################
        # Only the main page and Time Format selection is checked
        date_time_page = settings.open_date_and_time()
        self.take_screenshot("date_and_time")
        GaiaImageCompareTestCase.scroll(
            self.marionette, "down", date_time_page.screen_element.size["height"], screen=date_time_page.screen_element
        )
        self.take_screenshot("date_and_time")
#.........这里部分代码省略.........
开发者ID:nth10sd,项目名称:gaia,代码行数:103,代码来源:test_settings_personalization_RTL.py

示例13: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self):

        settings = Settings(self.marionette)
        settings.launch()

        ################## Screen Lock ######################
        screenlock_view = settings.open_screen_lock()
        screenlock_view.enable_lockscreen()
        self.take_screenshot('screen_lock')
        screenlock_view.enable_passcode_lock()
        self.take_screenshot('screen_lock-passcode')
        settings.return_to_prev_menu(screenlock_view.screen_element)
        settings.return_to_prev_menu(settings.screen_element)

        ################## App Permission ######################
        permission_view = settings.open_app_permissions()
        self.take_screenshot('app_permissions')
        permission_view.tap_first_item()
        self.take_screenshot('app_permissions-app_list')
        permission_view.tap_geolocation_selection()
        self.take_screenshot('app_permissions-geoloc_option')
        permission_view.exit_geolocation_selection()
        settings.return_to_prev_menu(permission_view.screen_element)
        settings.return_to_prev_menu(settings.screen_element)

        ################## Do Not Track ######################
        dnt_page = settings.open_do_not_track()
        self.take_screenshot('do_not_track')
        GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                        settings.screen_element.size['height'], screen = dnt_page.screen_element)
        self.take_screenshot('do_not_track')
        settings.return_to_prev_menu(settings.screen_element)

        ################## Browsing Privacy ######################
        browsingprivacy_page = settings.open_browsing_privacy()
        self.take_screenshot('browsing_privacy')
        browsingprivacy_page.tap_clear_browsing_history()
        self.take_screenshot('browsing_privacy-history')
        browsingprivacy_page.cancel_clear()
        browsingprivacy_page.tap_clear_private_data()
        self.take_screenshot('browsing_privacy-data')
        browsingprivacy_page.cancel_clear()
        settings.return_to_prev_menu(settings.screen_element)

        ################# Privacy Controls ######################
        privacycontrol_page = settings.open_privacy_controls()
        self.apps.switch_to_displayed_app()
        privacycontrol_page.tap_close_tour()
        self.take_screenshot('privacy_control')
        privacycontrol_page.tap_about()
        self.take_screenshot('privacy_control-about')
        privacycontrol_page.exit_about()

        #### Location Accuracy
        # Note: Checking only the first app in the app list
        loc_acc_page = privacycontrol_page.tap_loc_accuracy()
        loc_acc_page.switch_loc_adjustment()
        self.take_screenshot('privacy_control-locacc')
        loc_acc_page.tap_adjustment_selection()
        self.take_screenshot('privacy_control-locacc-adjust_selection')
        loc_acc_page.tap_adjustment_ok()
        loc_acc_page.tap_add_exception()
        self.take_screenshot('privacy_control-locacc-applist')
        loc_acc_page.tap_first_app()
        self.take_screenshot('privacy_control-locacc-applist-firstapp')
        loc_acc_page.tap_global_settings()
        self.take_screenshot('privacy_control-locacc-applist-globalsetting')
        loc_acc_page.tap_global_settings_ok()
        settings.return_to_prev_menu(loc_acc_page.applist_screen_element)
        settings.return_to_prev_menu(loc_acc_page.screen_element)
        settings.return_to_prev_menu(privacycontrol_page.screen_element)

        #### Remote Protect
        privacycontrol_page.tap_remote_protect()
        self.take_screenshot('privacy_control-remprotect')
        settings.return_to_prev_menu(privacycontrol_page.screen_element)

        #### Transparency Controls
        #### Note: Only the first app and first permission details are opened for format check
        transpc_view = privacycontrol_page.tap_trans_control()
        self.take_screenshot('privacy_control-trans_ctrl')
        transpc_view.tap_applications()
        self.take_screenshot('privacy_control-trans_ctrl_apps')
        transpc_view.tap_app_order_selection()
        self.take_screenshot('privacy_control-trans_ctrl_apps_order_select')
        transpc_view.tap_app_order_ok()
        #tap first app
        transpc_view.tap_first_app_in_list()
        self.take_screenshot('privacy_control-trans_ctrl_first_app')
        settings.return_to_prev_menu(transpc_view.apps_screen_element, False)
        settings.return_to_prev_menu(transpc_view.screen_element, False)
        transpc_view.tap_permissions()

        self.take_screenshot('privacy_control-transp-perm')
        for i in range(0, 5):
            GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                            settings.screen_element.size['height'],
                                            screen=transpc_view.perm_screen_element)
            self.take_screenshot('privacy_control-transp-perm')
        transpc_view.tap_first_perm_in_list()
#.........这里部分代码省略.........
开发者ID:nishesj,项目名称:gaia,代码行数:103,代码来源:test_settings_PS_RTL.py

示例14: test_calendar_flick

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_calendar_flick(self):
        """https://bugzilla.mozilla.org/show_bug.cgi?id=937085"""

        calendar = Calendar(self.marionette)
        calendar.launch()

        calendar.flick_to_next_month()
        self.take_screenshot()

        calendar.flick_to_previous_month()
        self.take_screenshot()

        calendar.flick_to_previous_month()
        self.take_screenshot()

        calendar.tap_week_display_button()
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                        300, locator=calendar._week_view_locator)
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'up',
                                        300, locator=calendar._week_view_locator)
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'right',
                                        100, locator=calendar._week_view_locator)
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'left',
                                        100, locator=calendar._week_view_locator)
        self.take_screenshot()

        calendar.tap_day_display_button()
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                        300, locator=calendar._day_view_locator)
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'up',
                                        300, locator=calendar._day_view_locator)
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'right',
                                        100, locator=calendar._day_view_locator)
        self.take_screenshot()
        GaiaImageCompareTestCase.scroll(self.marionette, 'left',
                                        100, locator=calendar._day_view_locator)
        GaiaImageCompareTestCase.scroll(self.marionette, 'left',
                                        100, locator=calendar._day_view_locator)
        self.take_screenshot()
开发者ID:arroway,项目名称:gaia,代码行数:48,代码来源:test_calendar_flick.py

示例15: test_settings_app

# 需要导入模块: from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase [as 别名]
# 或者: from gaiatest.gaia_graphics_test.GaiaImageCompareTestCase import scroll [as 别名]
    def test_settings_app(self):
        settings = Settings(self.marionette)
        settings.launch()

        # opening each subpage in Settings menu.
        # some subpages have their own subpages, and they need to be opened as well.
        #################### Wi-Fi and its subpages ######################
        wifi_page = settings.open_wifi()
        Wait(self.marionette).until(lambda m: wifi_page.is_wifi_enabled is True)

        self.take_screenshot('wifi-enabled')
        wifi_page.tap_connect_with_wps()
        self.take_screenshot('wifi-wps')
        settings.return_to_prev_menu(wifi_page.screen_element, wifi_page.wps_screen_element)
        self.marionette.execute_script('arguments[0].scrollIntoView(false);', [wifi_page.manage_network_button])
        wifi_page.tap_manage_networks()
        wifi_page.tap_join_hidden_network()
        wifi_page.tap_security_selector()
        self.take_screenshot('wifi-securityType', top_frame=True)
        wifi_page.tap_security_ok()
        self.take_screenshot('wifi-joinHidden')
        settings.return_to_prev_menu(wifi_page.manage_network_screen_element,
                                     wifi_page.join_hidden_network_screen_element)
        self.take_screenshot('wifi-manageNetwork')
        settings.return_to_prev_menu(wifi_page.screen_element, wifi_page.manage_network_screen_element)
        wifi_page.tap_manage_certs()
        wifi_page.tap_import_certs()
        self.take_screenshot('wifi-importCert')
        settings.return_to_prev_menu(wifi_page.manage_certs_screen_element, wifi_page.select_certs_screen_element)
        self.take_screenshot('wifi-manageCert')
        settings.return_to_prev_menu(wifi_page.screen_element, wifi_page.manage_certs_screen_element)
        wifi_page.disable_wifi()
        self.take_screenshot('wifi-disabled')
        settings.return_to_prev_menu(settings.screen_element, wifi_page.screen_element)

        #################### Sim manager and its subpages ######################
        sim_page = settings.open_sim_manager()
        self.take_screenshot('sim_manager')
        GaiaImageCompareTestCase.scroll(self.marionette, 'down',
                                        sim_page.screen_element.size['height'],
                                        screen = sim_page.screen_element)
        self.take_screenshot('sim_manager')
        sim_page.tap_sim_security()
        sim_page.enable_sim_pin()
        self.take_screenshot('sim_manager-pin_page')
        settings.return_to_prev_menu(sim_page.security_screen_element,
                                     sim_page.sim_pin_screen_element)
        self.take_screenshot('sim_manager-security')
        settings.return_to_prev_menu(sim_page.screen_element, sim_page.security_screen_element)
        settings.return_to_prev_menu(settings.screen_element, sim_page.screen_element)

        ################### Call Settings and its subpages ######################
        cs_page = settings.open_call()
        self.take_screenshot('cs-selectSIM')
        cs_page.tap_sim_1()
        self.take_screenshot('callsettings')
        cs_page.tap_voicemail()
        self.take_screenshot('voicemail')
        settings.return_to_prev_menu(cs_page.cs_screen_element, cs_page.vm_screen_element)

        cs_page.tap_caller_id_selection()
        self.take_screenshot('callerID', top_frame=True)
        cs_page.confirm_caller_id_selection()

        cs_page.tap_fixed_dialing()
        self.take_screenshot('fixeddialing')
        cs_page.tap_auth_numbers()
        self.take_screenshot('authNumbers')
        settings.return_to_prev_menu(cs_page.fixed_dialing_screen_element,
                                     cs_page.auth_screen_element)
        cs_page.enable_fixed_dialing()
        self.take_screenshot('enableFDN')
        settings.return_to_prev_menu(cs_page.fixed_dialing_screen_element,
                                     cs_page.fixed_dialing_simpin_screen_element)
        settings.return_to_prev_menu(cs_page.cs_screen_element,
                                     cs_page.fixed_dialing_screen_element)

        cs_page.tap_call_forwarding()
        self.take_screenshot('callforward_init')
        cs_page.wait_until_call_forwarding_info_received()
        self.take_screenshot('callforward')
        cs_page.tap_always_forward()
        self.take_screenshot('alwaysFwd')
        settings.return_to_prev_menu(cs_page.call_forwarding_screen_element,
                                     cs_page.call_forwarding_always_screen_element)
        cs_page.tap_forward_when_busy()
        self.take_screenshot('busyFwd')
        settings.return_to_prev_menu(cs_page.call_forwarding_screen_element,
                                     cs_page.call_forwarding_busy_screen_element)
        cs_page.tap_forward_unanswered()
        self.take_screenshot('unansweredFwd')
        settings.return_to_prev_menu(cs_page.call_forwarding_screen_element,
                                     cs_page.call_forwarding_unans_screen_element)
        cs_page.tap_forward_unreachable()
        self.take_screenshot('unreachFwd')
        settings.return_to_prev_menu(cs_page.call_forwarding_screen_element,
                                     cs_page.call_forwarding_unreach_screen_element)
        settings.return_to_prev_menu(cs_page.cs_screen_element, cs_page.call_forwarding_screen_element)

        cs_page.tap_call_barring()
#.........这里部分代码省略.........
开发者ID:anubhav7495,项目名称:gaia,代码行数:103,代码来源:test_settings_NC_RTL.py


注:本文中的gaiatest.gaia_graphics_test.GaiaImageCompareTestCase.scroll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。