class SetLiveWallpaperSuspendResume(UIATestBase):
    def setUp(self):
        super(SetLiveWallpaperSuspendResume, self).setUp()
        self._test_name = __name__
        self._device = g_common_obj.get_device()
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self._liveWallpaper = WallpaperImpl()
        #         self._liveWallpaper.reset_wallpaper()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("com.android.galaxy4")
        if result == 0:
            self._composeui.install_apk('Galaxy4')

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(SetLiveWallpaperSuspendResume, self).tearDown()
        #         self._liveWallpaper.reset_wallpaper()
        self._liveWallpaper.stop_settings_am()

    def test_liveWallpaper_suspendResume(self):
        ''' refer TC test_LiveWallpaper_SuspendResume
        '''
        print "[RunTest]: %s" % self.__str__()
        #         self._liveWallpaper.set_livewallpaper_by_desktop("Black Hole")
        self._liveWallpaper.set_livewallpaper_by_Settings()
        self._device.press.home()
        time.sleep(5)
        self._device.screen.off()
        time.sleep(3)
        self._device.screen.on()
        g_common_obj.assert_exp_happens()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()

    def test_screenshot_pngformat(self):
        ''' refer TC test_Screenshot_PNGFormat
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.capture_screen_shot()
        time.sleep(2)
        #         ImageDetails.set_workaround()
        #         self.photos.launch_photos_am()
        self.photos.open_image_command("/sdcard/Pictures/screen.png")
        time.sleep(2)
        self._composeui.check_photos_format()
        self.photos.stop_photos_am()
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        self.device = g_common_obj.get_device()
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self._imageviewer = ImageDetails()
        self.photos = PhotosExtendImpl()
        self.photosImpl = get_photo_implement()
        self.qrcodeImpl = QRcode()
        g_common_obj.root_on_device()
        g_common_obj.remount_device()
        self.photosImpl.rm_delete_photos()
        self.photosImpl.refresh_sdcard()
        self.photos.clean()

        self.qrcode = "GIFPICTURE"
        config = TestConfig()
        cfg_file = 'tests.tablet.artifactory.conf'
        cfg_arti = config.read(cfg_file, 'artifactory')
        config_handle = ConfigHandle()
        cfg_arti["location"] = config_handle.read_configuration('artifactory', 'location', '/etc/oat/', 'sys.conf')

        cfg = config.read(cfg_file, 'qrcode_marked_image')
        self.qrcode = cfg.get("screenshot_edit_qrcode")
        print "[Debug] qrcode:%s" % (self.qrcode)
        arti = Artifactory(cfg_arti.get('location'))
        pic_name = cfg.get("screenshot_edit_image")
        file_path = arti.get(pic_name)
        g_common_obj.adb_cmd_common('push ' + file_path + ' /sdcard/Pictures')
        self.photosImpl.refresh_sdcard()
        special_actions.setup()
        self.photos.setup()
예제 #4
0
 def setUp(self):
     super(ComposeUI, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     #### Replace with MX
     # self._flvvideoplayer = FLVVideoPlayer()
     # self._composeui = ComposeUiImpl()
     # self.photos = get_photo_implement()
     # config = TestConfig()
     # cfg_file = 'tests.tablet.composeui.conf'
     # cfg_arti = config.read(cfg_file, 'artifactory')
     # config_handle = ConfigHandle()
     # cfg_arti["location"] = config_handle.read_configuration('artifactory', 'location', '/etc/oat/', 'sys.conf')
     # arti = Artifactory(cfg_arti.get('location'))
     # cfg_apk = config.read(cfg_file, 'FLVplayer')
     # binary_name = cfg_apk.get("name")
     # file_path = arti.get(binary_name)
     # result = config_handle.check_apps("air.br.com.bitlabs.FLVPlayer")
     # if result == 0:
     #     g_common_obj.adb_cmd_common('install ' + file_path)
     # self.photos.rm_delete_photos()
     # self.photos.refresh_sdcard()
     # self._composeui.init_local_video()
     self._composeui = ComposeUiImpl()
     self._fit = FitImpl()
     config_handle = ConfigHandle()
     result = config_handle.check_apps("com.mxtech.videoplayer.ad")
     if result == 0:
         self._composeui.install_apk('Mxplayer')
     self._composeui.init_local_video()
class ComposeUI(UIATestBase):

    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()

    def test_videoplayback_pasuseandresume(self):
        ''' refer TC test_VideoPlayback_PasuseAndResume
        '''
        print "[RunTest]: %s" % self.__str__()
        self.photos.launch_photos_am()
        self._composeui.play_video_and_pause_resume()
        self.photos.stop_photos_am()
 def setUp(self):
     super(ComposeUI, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._composeui = ComposeUiImpl()
     self.photos = get_photo_implement()
     self.photos.rm_delete_photos()
     self.photos.refresh_sdcard()
 def setUp(self):
     super(ComposeUI, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._composeui = ComposeUiImpl()
     config_handle = ConfigHandle()
     result = config_handle.check_apps("com.intel.aws.workload.applaunch")
     if result == 0:
         self._composeui.install_apk('LaunchWorkload')
 def setUp(self):
     super(ComposeUI, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._composeui = ComposeUiImpl()
     self._fit = FitImpl()
     config_handle = ConfigHandle()
     result = config_handle.check_apps("com.mxtech.videoplayer.ad")
     if result == 0:
         self._composeui.install_apk('Mxplayer')
     self._composeui.init_local_video()
class ComposeUI(UIATestBase):

    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        self.device = g_common_obj.get_device()
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self._imageviewer = ImageDetails()
        self.photos = PhotosExtendImpl()
        self.photosImpl = get_photo_implement()
        self.qrcodeImpl = QRcode()
        g_common_obj.root_on_device()
        g_common_obj.remount_device()
        self.photosImpl.rm_delete_photos()
        self.photosImpl.refresh_sdcard()
        self.photos.clean()

        self.qrcode = "GIFPICTURE"
        config = TestConfig()
        cfg_file = 'tests.tablet.artifactory.conf'
        cfg_arti = config.read(cfg_file, 'artifactory')
        config_handle = ConfigHandle()
        cfg_arti["location"] = config_handle.read_configuration('artifactory', 'location', '/etc/oat/', 'sys.conf')

        cfg = config.read(cfg_file, 'qrcode_marked_image')
        self.qrcode = cfg.get("screenshot_edit_qrcode")
        print "[Debug] qrcode:%s" % (self.qrcode)
        arti = Artifactory(cfg_arti.get('location'))
        pic_name = cfg.get("screenshot_edit_image")
        file_path = arti.get(pic_name)
        g_common_obj.adb_cmd_common('push ' + file_path + ' /sdcard/Pictures')
        self.photosImpl.refresh_sdcard()
        special_actions.setup()
        self.photos.setup()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self.photosImpl.rm_delete_photos()
        self.photosImpl.refresh_sdcard()
        clearTmpDir()

    def test_screenshot_imageedit(self):
        ''' refer TC test_screenshot_imageedit
        '''
        print "[RunTest]: %s" % self.__str__()
        self.photosImpl.launch_photos_am()
        self._composeui.addeffects_check_screenshot()
        self.device.press.back()
        time.sleep(2)
        self.photosImpl.open_a_picture()
        self.qrcodeImpl.verify_qrcode_marked_image(self.qrcode, set_wallpaper=False)
        self.photosImpl.stop_photos_am()
 def setUp(self):
     super(SetLiveWallpaperSuspendResume, self).setUp()
     self._test_name = __name__
     self._device = g_common_obj.get_device()
     print "[Setup]: %s" % self._test_name
     self._composeui = ComposeUiImpl()
     self._liveWallpaper = WallpaperImpl()
     #         self._liveWallpaper.reset_wallpaper()
     config_handle = ConfigHandle()
     result = config_handle.check_apps("com.android.galaxy4")
     if result == 0:
         self._composeui.install_apk('Galaxy4')
 def setUp(self):
     super(ComposeUI, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._composeui = ComposeUiImpl()
     self.photos = get_photo_implement()
     self.photos.rm_delete_photos()
     self.photos.refresh_sdcard()
     self._composeui.init_local_video()
     self.extend_photos = PhotosExtendImpl()
     self.remote_path = self.extend_photos.push_videos(like='test_video_qr',
                                                       exts='.mp4')[0]
예제 #12
0
 def setUp(self):
     super(ComposeUI, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._composeui = ComposeUiImpl()
     config_handle = ConfigHandle()
     result = config_handle.check_apps("org.geometerplus.zlibrary.ui.android")
     if result == 0:
         self._composeui.install_apk('FBReader')
     result = config_handle.check_apps("org.geometerplus.fbreader.plugin.pdf")
     if result == 0:
         self._composeui.install_apk('PDFplugin')
     self._composeui.init_local_pdf()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.delete_local_video()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        g_common_obj.set_vertical_screen()

    def test_videoplayback_interaction(self):
        ''' refer TC test_VideoPlayback_Interaction
        '''
        print "[RunTest]: %s" % self.__str__()
        self.photos.launch_photos_am()
        self._composeui.rotate_during_video_playback()
        time.sleep(2)
        g_common_obj.set_vertical_screen()
        g_common_obj.assert_exp_happens()
        self._composeui.swipedown_notification_and_rotate_during_video_playback(
        )
        time.sleep(2)
        g_common_obj.set_vertical_screen()
        g_common_obj.assert_exp_happens()
        self.photos.stop_photos_am()
예제 #14
0
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self.d = g_common_obj.get_device()
        #         self.photos = get_photo_implement()
        self._composeui = ComposeUiImpl()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("com.mxtech.videoplayer.ad")
        if result == 0:
            self._composeui.install_apk('Mxplayer')
        self.d.screen.on()
        self._qr = QRcode()
        self.extend_photos = PhotosExtendImpl()
        self.remote_path = self.extend_photos.push_videos(
            count=1, like='test_video_qr_middle', exts='.mp4')[0]
        adb32.screen_rotation(0)

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        os.remove("tmp.png")
        adb32.screen_rotation(0)

    def test_scaling_rotation_Video(self):
        ''' refer TC test_Scaling_Rotation_Video
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.play_video_command_mx(self.remote_path)
        time.sleep(2)
        if self.d(textContains="START OVER").exists:
            self.d(textContains="START OVER").click.wait()
        for i in [2, 1, 3, 0]:
            adb32.screen_rotation(i)
            time.sleep(1)
            if self.d(resourceId="com.mxtech.videoplayer.ad:id/ui_layout"
                      ).exists:
                self.d(resourceId="com.mxtech.videoplayer.ad:id/ui_layout"
                       ).pinch.Out(percent=120)
                time.sleep(2)
                assert self._qr.decode_image_qrcode(
                    self.d.screenshot("tmp.png")
                )[1] == "QRCODE_TEST_STRING", "The scaling of video playback failed!"
                self.d(resourceId="com.mxtech.videoplayer.ad:id/ui_layout"
                       ).pinch.In(percent=70, steps=5)
                time.sleep(2)
                assert self._qr.decode_image_qrcode(
                    self.d.screenshot("tmp.png")
                )[1] == "QRCODE_TEST_STRING", "The scaling of video playback failed!"
class LiveWallpaperPreview(UIATestBase):
    def setUp(self):
        super(LiveWallpaperPreview, self).setUp()
        self._test_name = __name__
        self._device = g_common_obj.get_device()
        print "[Setup]: %s" % self._test_name
        self._liveWallpaper = WallpaperImpl()
        self._composeui = ComposeUiImpl()
        #         self._liveWallpaper.reset_wallpaper()
        self._device = g_common_obj.get_device()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("com.android.galaxy4")
        if result == 0:
            self._composeui.install_apk('Galaxy4')
        self.livewallpaper = ["Black Hole"]

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(LiveWallpaperPreview, self).tearDown()
        #         self._liveWallpaper.reset_wallpaper()
        self._liveWallpaper.stop_settings_am()

    def test_LiveWallpaper_PreviewAndSetAs(self):
        ''' refer TC test_LiveWallpaper_PreviewAndSetAs
        '''
        print "[RunTest]: %s" % self.__str__()
        self._liveWallpaper.launch_set_livewallpaper_by_Settings()
        time.sleep(10)
        #         self._device(text="Wallpapers").click.wait()
        #         for i in range (0,len(self.livewallpaper)):
        #             time.sleep(1)
        #             try:
        #                 self._device(scrollable=True).scroll.horiz.to(text=self.livewallpaper[i])
        #                 time.sleep(1)
        #                 self._device(text=self.livewallpaper[i]).click.wait()
        #                 time.sleep(4)
        #             except:
        #                 print "Can't find text: " + self.livewallpaper[i]
        #             g_common_obj.assert_exp_happens()
        #             if i !=len(self.livewallpaper):
        #                 self._device.press.back()
        #             else:
        #                 self._device(text="Set wallpaper").click.wait()
        #                 time.sleep(2)
        #                 self._device.press.home()
        #                 time.sleep(1)
        #                 g_common_obj.assert_exp_happens()
        g_common_obj.assert_exp_happens()
예제 #16
0
 def setUp(self):
     super(ComposeUI, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self.d = g_common_obj.get_device()
     #         self.photos = get_photo_implement()
     self._composeui = ComposeUiImpl()
     config_handle = ConfigHandle()
     result = config_handle.check_apps("com.mxtech.videoplayer.ad")
     if result == 0:
         self._composeui.install_apk('Mxplayer')
     self.d.screen.on()
     self._qr = QRcode()
     self.extend_photos = PhotosExtendImpl()
     self.remote_path = self.extend_photos.push_videos(
         count=1, like='test_video_qr_middle', exts='.mp4')[0]
     adb32.screen_rotation(0)
class ComposeUI(UIATestBase):
    @classmethod
    def setUpClass(self):
        """
        init test environment
        """
        super(ComposeUI, self).setUpClass()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        config = TestConfig()
        cfg_file = 'tests.tablet.artifactory.conf'
        cfg_arti = config.read(cfg_file, 'artifactory')
        config_handle = ConfigHandle()
        cfg_arti["location"] = config_handle.read_configuration(
            'artifactory', 'location', '/etc/oat/', 'sys.conf')
        cfg = config.read(cfg_file, 'content_picture')
        arti = Artifactory(cfg_arti.get('location'))
        pic_name = cfg.get("png")
        file_path = arti.get(pic_name)
        g_common_obj.adb_cmd_common('push ' + file_path + ' /sdcard/Pictures')
        self.pic_path = '/sdcard/Pictures/' + os.path.basename(file_path)
        ImageDetails.set_workaround()

    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        ImageDetails.delete_picture()
        ImageDetails.set_workaround()

    def test_screenshot_widthandheightcheck(self):
        ''' refer TC test_Screenshot_WidthAndHeightCheck
        '''
        print "[RunTest]: %s" % self.__str__()
        #         self.photos.launch_photos_am()
        self.photos.open_image_command(self.pic_path)
        time.sleep(5)
        self._composeui.capture_screen_shot_with_png_and_check()
        self.photos.stop_photos_am()
예제 #18
0
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()

    def test_rotate_clockwise_5times(self):
        ''' refer TC test_Rotate_Clockwise_5times
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.launch_settings_am()
        self._composeui.Rotate_clockwise_5times()
        self._composeui.stop_settings_am()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        ImageDetails.delete_picture()
        ImageDetails.set_workaround()

    def test_screenshot_homescreen_staticwallpaper(self):
        ''' refer TC test_ScreenShot_HomeScreen_StaticWallpaper
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.capture_screen_shot()
예제 #20
0
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.delete_local_video()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        g_common_obj.set_vertical_screen()

    def test_rotate_playvideo(self):
        ''' refer TC test_Rotate_PlayVideo
        '''
        print "[RunTest]: %s" % self.__str__()
        self.photos.launch_photos_am()
        self._composeui.rotate_during_video_playback()
        self.photos.stop_photos_am()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        self._composeui.init_local_video()
        self.extend_photos = PhotosExtendImpl()
        self.remote_path = self.extend_photos.push_videos(like='test_video_qr',
                                                          exts='.mp4')[0]

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.delete_local_video()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        ImageDetails.delete_picture()
        ImageDetails.set_workaround()

    def test_screenshot_videoplayback(self):
        ''' refer TC test_Screenshot_VideoPlayback
        '''
        print "[RunTest]: %s" % self.__str__()
        #         self.photos.launch_photos_am()
        self.photos.play_video_command(self.remote_path)
        time.sleep(5)
        self._composeui.capture_screen_shot_during_video_playback()
        self.photos.stop_photos_am()
예제 #22
0
class ComposeUI(UIATestBase):

    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        g_common_obj.set_vertical_screen()

    def test_rotatedutwithnotificationbar_20times(self):
        ''' refer TC test_RotateDUTWithNotificationBar_20times
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.launch_settings_am()
        self._composeui.rotate_to_left()
        self._composeui.popup_notification_bar()
        self._composeui.rotate_20times()
        self._composeui.stop_settings_am()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()

    def test_screenshot_suspendresume(self):
        ''' refer TC test_Screenshot_SuspendResume
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.capture_screen_shot()
        self._composeui.suspend_and_resume()
예제 #24
0
class ComposeUI(UIATestBase):

    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        ImageDetails.delete_picture()
        ImageDetails.set_workaround()
        g_common_obj.set_vertical_screen()

    def test_screenshot_approtate(self):
        ''' refer TC test_ScreenShot_AppRotate
        '''
        print "[RunTest]: %s" % self.__str__()
        self.photos.launch_photos_am()
        self._composeui.rotate_to_left()
        self._composeui.capture_screen_shot()
class ComposeUI(UIATestBase):

    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("com.intel.aws.workload.applaunch")
        if result == 0:
            self._composeui.install_apk('LaunchWorkload')

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.uninstall_workload()

    def test_applaunchworkload_applaunchtime(self):
        ''' refer TC test_AppLaunchWorkload_AppLaunchTime
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.launch_workload_am()
        self._composeui.test_config_apps()
        self._composeui.stop_workload_am()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
#         self._liveWallpaper = WallpaperImpl()
#         self._liveWallpaper.reset_wallpaper()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        clearTmpDir()

    def test_ScreenCapture_screencap(self):
        ''' refer TC test_ScreenCapture_screencap
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.capture_screenshot_compare_screenshot()
예제 #27
0
 def setUp(self):
     super(ComposeUI, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._composeui = ComposeUiImpl()
예제 #28
0
class ComposeUI(UIATestBase):

    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("org.geometerplus.zlibrary.ui.android")
        if result == 0:
            self._composeui.install_apk('FBReader')
        result = config_handle.check_apps("org.geometerplus.fbreader.plugin.pdf")
        if result == 0:
            self._composeui.install_apk('PDFplugin')
        self._composeui.init_local_pdf()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.uninstall_fbreader_and_pdfplugin()
        self._composeui.delete_local_pdf()

    def test_immersemode_fbreader(self):
        ''' refer TC test_ImmerseMode_FBReader
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.launch_fbreader_and_pdfplugin()
        self._composeui.check_notification_in_pdfreader()
        self._composeui.stop_fbreader_and_pdfplugin()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self._fit = FitImpl()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("com.mxtech.videoplayer.ad")
        if result == 0:
            self._composeui.install_apk('Mxplayer')
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.uninstall_mxtech()
        self._fit.open_wifi()
        self._composeui.delete_local_video()

    def test_immersemode_mxplayer(self):
        ''' refer TC test_ImmerseMode_MXPlayer
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.launch_mxtech_am()
        self._composeui.check_notification_during_playing()
        self._composeui.stop_mxtech_am()
예제 #30
0
 def setUp(self):
     super(ComposeUI, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._composeui = ComposeUiImpl()
     self.photos = get_photo_implement()