Exemplo n.º 1
0
class ChromeCast(UIATestBase):

    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._settings = DBSettingsSetGet()
        self._settings.set_screen_off_timeout(60000)
        self._settings.set_status_stay_awake(False)
        self._chromecast.connect_chromecast()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._settings.set_screen_off_timeout(1800000)
        self._settings.set_status_stay_awake(True)
        self._chromecast.disconnect_chromecast()

    def test_chromecast_autosleep_1minute(self):
        ''' refer TC test_Chromecast_AutoSleep_1minute
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.sleep_time(61)
            self._chromecast.check_screen_status()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._pic_names_list = self._chromecast.init_photos()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()
        self._chromecast.delete_photos()

    def test_screencasting_imagesviewing(self):
        ''' refer TC test_ScreenCasting_ImagesViewing
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.launch_photos_am()
            #self._chromecast.view_photos()
            for pic_name in self._pic_names_list:
                self._chromecast.view_photos_new(pic_name)
            self._chromecast.stop_photos_am()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
Exemplo n.º 3
0
class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.init_wps()
        self._chromecast.connect_chromecast()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()
        self._chromecast.uninstall_wps()

    def test_screencasting_pdf_file_presentation(self):
        ''' refer TC test_ScreenCasting_PDFFilePresentation
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.launch_wps_am()
            self._chromecast.view_pdf_with_wps()
            self._chromecast.stop_wps_am()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

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

    def test_screencasting_presentationmode_dutscreenoff(self):
        ''' refer TC test_ScreenCasting_PresentationMode_DUTScreenOff
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.install_apidemos()
            self._chromecast.launch_apidemos_am()
            self._chromecast.run_medie_router()
            self._chromecast.suspend_and_resume()
            self._chromecast.stop_apidemos_am()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

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

    def test_screencasting_suspendresume(self):
        ''' refer TC test_ScreenCasting_SuspendResume
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.suspend_and_resume()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
class ChromeCast(UIATestBase):

    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()
        self._chromecast.delete_captured_video()
        self._chromecast.swith_camera_to_capture_mode()

    def test_screencasting_openrecordedvideo(self):
        ''' refer TC test_ScreenCasting_OpenRecordedVideo
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.launch_camera_am()
            self._chromecast.capture_a_video()
            self._chromecast.stop_camera_am()
            self._chromecast.launch_photos_am()
            self._chromecast.play_video_in_photos()
            self._chromecast.stop_photos_am()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
Exemplo n.º 7
0
class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._chromecast.delete_captured_video()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()
        self._chromecast.swith_camera_to_capture_mode()
        self._chromecast.delete_captured_video()

    def test_camera_sdvideorecording_semi_auto(self):
        ''' refer TC test_Camera_SDVideoRecording
        '''
        print "[RunTest]: %s" % self._test_name
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.launch_camera_am()
            self._chromecast.set_record_sd_mode()
            self._chromecast.capture_a_video()
            self._chromecast.stop_camera_am()
            recorded_video = self._usb_camera_obj.stop_record()
        except:
            self._usb_camera_obj.stop_record()
        upload_file_to_prdshtwsv2d01(self, recorded_video)
class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

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

    def test_rotation_livewallpaper(self):
        ''' refer TC test_Rotation_LiveWallpaper
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.set_live_wallpaper()
            self._chromecast.rotate_clockwise_anticlockwise()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
Exemplo n.º 9
0
class ChromeCast(UIATestBase):

    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._video_path = self._chromecast.init_local_video()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()
        self._chromecast.delete_local_video()

    def test_screencasting_sleepdutduringvideoplayback(self):
        ''' refer TC test_ScreenCasting_SleepDUTduringVideoPlayback
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.launch_photos_am()
            self._chromecast.play_video_in_photos_direct(self._video_path)
            self._chromecast.suspend_and_resume()
            self._chromecast.stop_photos_am()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
 def setUp(self):
     super(ChromeCast, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._chromecast = ChromeCastImpl()
     self._chromecast.connect_chromecast()
     self._output_file = self._test_name.split(".")[-1]
     self._usb_camera_obj = UsbCamera(self._output_file)
Exemplo n.º 11
0
 def setUp(self):
     super(ChromeCast, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._chromecast = ChromeCastImpl()
     self._settings = DBSettingsSetGet()
     self._settings.set_screen_off_timeout(60000)
     self._settings.set_status_stay_awake(False)
     self._chromecast.connect_chromecast()
     self._output_file = self._test_name.split(".")[-1]
     self._usb_camera_obj = UsbCamera(self._output_file)