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


Python gaia_graphics_test.GaiaImageCompareTestCase类代码示例

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


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

示例1: setUp

    def setUp(self):
        GaiaImageCompareTestCase.setUp(self)
        self.data_layer.set_time(self._seconds_since_epoch * 1000)
        self.data_layer.set_setting('time.timezone', 'Atlantic/Reykjavik')

        self.today = datetime.datetime.utcfromtimestamp(self._seconds_since_epoch)
        # Determine the name and the year of the next month
        self.next_month_year = self.today.replace(day=1) + datetime.timedelta(days=32)
开发者ID:Anirudh0,项目名称:gaia,代码行数:8,代码来源:test_calendar_flick.py

示例2: setUp

    def setUp(self):
        GaiaImageCompareTestCase.setUp(self)
        self.cards_view = CardsView(self.marionette)

        # Launch the test apps
        for app in self._test_apps:
            self.apps.launch(app)
            # Let's wait a bit for the app to fully launch
            time.sleep(2)
开发者ID:Caracolor,项目名称:gaia,代码行数:9,代码来源:test_cards_view_kill_apps_with_two_apps.py

示例3: test_settings_app

    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,代码行数:10,代码来源:test_settings_RTL_Main_View.py

示例4: setUp

    def setUp(self):
        GaiaImageCompareTestCase.setUp(self)
        self.cards_view = CardsView(self.marionette)

        # Launch the test apps
        for app in self._test_apps:
            self.apps.launch(app)

            # 10 seconds for the actual user using the app a bit, and going back to homescreen
            time.sleep(10)
            self.device.touch_home_button()
开发者ID:AaskaShah,项目名称:gaia,代码行数:11,代码来源:test_cards_view_kill_apps_with_two_apps.py

示例5: test_settings_app

    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,代码行数:54,代码来源:test_settings_storage_RTL.py

示例6: setUp

    def setUp(self):
        if not GaiaTestEnvironment(self.testvars).email.get('imap'):
            raise SkipTest('IMAP account details not present in test variables.')
        if not GaiaTestEnvironment(self.testvars).email.get('smtp'):
            raise SkipTest('SMTP account details not present in test variables.')

        GaiaImageCompareTestCase.setUp(self)
        self.connect_to_local_area_network()

        self.email = Email(self.marionette)
        self.email.launch()
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:11,代码来源:test_setup_and_send_receive_imap_email.py

示例7: setUp

    def setUp(self):
        GaiaImageCompareTestCase.setUp(self)
        self.cards_view = CardsView(self.marionette)

        self.contacts = Contacts(self.marionette)
        self.contacts.launch()
        self.gallery = Gallery(self.marionette)
        self.gallery.launch(empty=True)

        # 10 seconds for the actual user using the app a bit, and going back to homescreen
        time.sleep(10)
        self.device.touch_home_button()
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:12,代码来源:test_cards_view_kill_apps_with_two_apps.py

示例8: test_settings_app

    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,代码行数:52,代码来源:test_settings_device_RTL.py

示例9: setUp

    def setUp(self):
        GaiaImageCompareTestCase.setUp(self)
        self.push_resource(self.images, count=self.image_count)

        self.take_screenshot()

        # Launch the test apps
        for app in self._test_apps:
            self.apps.launch(app)
            
            # 10 seconds for the actual user using the app a bit, and going back to homescreen
            time.sleep(10)
            self.device.touch_home_button()
开发者ID:anubhav7495,项目名称:gaia,代码行数:13,代码来源:test_cards_view_with_two_apps.py

示例10: setUp

    def setUp(self):
        GaiaImageCompareTestCase.setUp(self)
        self.push_resource(self.images, count=self.image_count)

        self.take_screenshot()

        # Launch the test apps
        for app in self._test_apps:
            self.apps.launch(app)
            time.sleep(4)
            self.device.touch_home_button()

        # Switch to top level frame before starting the test
        self.marionette.switch_to_frame()
开发者ID:Caracolor,项目名称:gaia,代码行数:14,代码来源:test_cards_view_with_two_apps.py

示例11: test_settings_app

    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,代码行数:49,代码来源:test_settings_PS_RTL.py

示例12: setUp

    def setUp(self):
        GaiaImageCompareTestCase.setUp(self)
        self.push_resource(self.images, count=self.image_count)

        self.take_screenshot(top_frame=True)

        self.contacts = Contacts(self.marionette)
        self.contacts.launch()
        # 10 seconds for the actual user using the app a bit, and going back to homescreen
        time.sleep(10)
        self.device.touch_home_button()
        self.gallery = Gallery(self.marionette)
        self.gallery.launch()
        # 10 seconds for the actual user using the app a bit, and going back to homescreen
        time.sleep(10)
        self.device.touch_home_button()
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:16,代码来源:test_cards_view_with_two_apps.py

示例13: test_settings_app

    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,代码行数:47,代码来源:test_settings_storage_RTL.py

示例14: test_settings_app

    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,代码行数:45,代码来源:test_settings_NC_RTL.py

示例15: test_browser_navigation

    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,代码行数:21,代码来源:test_browser_navigation.py


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