def test_04_camera_setting(self):
        '''相机设置'''
        creation.creation_page().click_camera_btn()
        camera.camera_page().click_cam_setting_btn()
        camera.camerasetting_page().switch_flashlight()
        print('打开闪光灯')
        self.screenshot()
        camera.camerasetting_page().switch_flashlight()

        camera.camerasetting_page().switch_grid()
        print('设置九宫格')
        self.screenshot()

        camera.camerasetting_page().select_record_speed(2)
        print('设置拍摄速度')
        self.screenshot()
        camera.camerasetting_page().select_countdown_time()
        print('设置倒计时')
        self.screenshot()
        camera.camerasetting_page().switch_aelock()
        self.back()
        tips = camera.camera_page().get_aelock_tip()
        print(tips)
        self.screenshot()

        camera.camera_page().click_record_btn()
        time.sleep(2)
        print('点击录制后1秒 截图查看倒计时')
        self.screenshot()
Exemplo n.º 2
0
 def test_01_getinfo(self):
     '''可下拉刷新,且个人页数据加载显示正常 ###查看截图'''
     log.i('个人页下拉刷新')
     creation.creation_page().click_my_btn()
     self.swipe_down(steps=0.1)
     time.sleep(1)
     info = str(community.userinfo_page().get_user_info("title"))
     log.i('userame  is \n%s' % info)
     self.screenshot()
 def test_03_camera_change(self):
     '''前后摄像头切换'''
     creation.creation_page().click_camera_btn()
     camera.camera_page().click_cam_switch_btn()
     print('切换相机到前置摄像头并截图')
     self.screenshot()
     camera.camera_page().click_cam_switch_btn()
     print('切换回到后摄像头并截图')
     self.screenshot()
 def test_01_click_camera_btn(self):
     '''高清相机进入并退出操作'''
     creation.creation_page().click_creation_btn()
     self.watch_device('允许|始终允许|取消')
     creation.creation_page().click_camera_btn()
     self.screenshot()
     self.back()
     self.d(text='取消').click_exists(timeout=3)
     self.unwatch_device()
 def test_03_login(self):
     '''小影账号登录'''
     creation.creation_page().click_my_btn()
     login.login_page().click_login_btn()
     login.login_page().click_qq()
     self.assertTrue(
         self.d(
             resourceId="com.quvideo.xiaoying:id/studio_title_text").wait())
     self.screenshot()
Exemplo n.º 6
0
 def test_04_click_to_top(self):
     '''点击击我Tab均可返回当前页顶部并刷新 ##查看截图'''
     log.i('点击击我Tab均可返回当前页顶部并刷新')
     creation.creation_page().click_my_btn()
     for i in range(5):
         BasePage().swipe_up(steps=0.05)
     log.i('点击前截图')
     self.screenshot()
     creation.creation_page().click_my_btn()
     log.i('点击后截图')
     self.screenshot()
 def test_02_camera_ratio(self):
     '''切换相机比例'''
     creation.creation_page().click_camera_btn()
     self.screenshot()
     camera.camera_page().click_cam_ratio_btn()
     print('切换相机比例并截图')
     self.screenshot()
     camera.camera_page().click_cam_ratio_btn()
     print('再次切换相机比例并截图')
     self.screenshot()
     camera.camera_page().click_cam_ratio_btn()
    def test_02_jump_login(self):
        '''未登录,评论@、点赞评论、回复评论、转发、关注、私信、拉黑 均应弹出登录框'''
        # '''未登录,点击评论、回复、点赞评论、评论@、关注、转发、拉黑、私信、参加活动、上传、描述@、登录等均应弹出登录框'''
        creation.creation_page().click_find_btn()
        community.community_page().select_Bar(2)
        # 下拉刷新
        self.swipe_down(steps=0.05)
        community.community_page().select_video_thumb()

        # 点击静音按钮以消除引导图
        community.feedVideo_page().click_MuteMode_btn()

        while community.feedVideo_page().get_video_info("comment") == "-":
            self.swipe_up(steps=0.05)
            time.sleep(2)
        community.feedVideo_page().click_comment_btn()
        # 评论@
        community.feedVideo_page().click_at_btn()
        self.assertTrue(login.login_page().is_login_page())
        self.back()
        # 评论点赞
        community.feedVideo_page().commet_lick_btn_click()
        self.assertTrue(login.login_page().is_login_page())
        self.back()
        # 回复评论
        community.feedVideo_page().comment_add()
        self.assertTrue(login.login_page().is_login_page())
        self.back()
        self.back()
        # 转发
        community.feedVideo_page().click_share_btn()
        self.assertTrue(login.login_page().is_login_page())
        self.back()
        # 关注
        if self.d(resourceId=
                  "com.quvideo.xiaoying:id/feed_bottom_head_follow_state"
                  ).exists:
            community.feedVideo_page().click_follow_state()
        else:
            self.swipe_up(steps=0.05)
            time.sleep(2)
            community.feedVideo_page().click_follow_state()
        self.assertTrue(login.login_page().is_login_page())
        self.back()
        # 跳转到他人详情页面
        community.feedVideo_page().click_head_btn()
        # 私信
        community.userinfo_page().select_more_action("私信")
        self.assertTrue(login.login_page().is_login_page())
        self.back()
        # 拉黑
        community.userinfo_page().select_more_action("直接拉黑")
        self.assertTrue(login.login_page().is_login_page())
        self.back()
Exemplo n.º 9
0
    def test_03_back_top(self):
        '''上移页面可收起个人信息栏,点击一键回顶部的按钮,可返回视频列表顶部  ##查看截图'''
        log.i('上移页面可收起个人信息栏,点击一键回顶部的按钮')

        creation.creation_page().click_my_btn()
        for i in range(5):
            BasePage().swipe_up(steps=0.05)
        log.i('点击前截图')
        self.screenshot()
        community.userinfo_page().click_back_top_btn()
        log.i('点击后截图')
        self.screenshot()
Exemplo n.º 10
0
 def test_04_click_view_pager_btn(self):
     '''次要功能位的点击操作'''
     creation.creation_page().click_creation_btn()
     creation.creation_page().click_view_pager_btn('相册MV')
     self.back()
     creation.creation_page().click_view_pager_btn('美颜趣拍')
     time.sleep(4)
     camera.camera_page().click_close_btn()
     creation.creation_page().click_view_pager_btn('素材中心')
     time.sleep(2)
     self.back()
     creation.creation_page().click_view_pager_btn('画中画编辑')
     time.sleep(2)
     self.screenshot()
    def test_01_install(self):
        '''小影安装,并允许各种权限'''
        self.d.app_uninstall(pkg_name)
        log.i('下载安装最新的apk')
        download_apk()
        self.local_install(apk['apk_path'])
        time.sleep(2)
        self.watch_device('允许|始终允许|取消|立即删除')  # 华为删除app后弹出清理弹窗
        self.d.app_start(pkg_name)
        self.d(resourceId="com.quvideo.xiaoying:id/wel_skip").click_exists(
            timeout=10)
        self.d(resourceId="com.quvideo.xiaoying:id/imgview_close_btn"
               ).click_exists(timeout=5)
        self.unwatch_device()

        creation.creation_page().click_creation_btn()
Exemplo n.º 12
0
    def test_01_install(self):
        '''小影安装,并允许各种权限'''
        download_apk()  # 下载小影最新的apk
        apk = get_apk()

        self.d.app_uninstall(pkg_name)
        self.local_install(apk['apk_path'])

        # print('install apk from URL:\n%s' % apk_url)
        # self.d.app_install(url=apk_url)

        time.sleep(2)
        self.watch_device('允许|始终允许|取消|立即删除')  #华为删除app后弹出清理弹窗
        self.d.app_start(pkg_name)
        self.d(resourceId="com.quvideo.xiaoying:id/wel_skip").click_exists(
            timeout=10)
        self.d(resourceId="com.quvideo.xiaoying:id/imgview_close_btn"
               ).click_exists(timeout=5)
        self.unwatch_device()
        creation.creation_page().click_my_btn()
        self.screenshot()
Exemplo n.º 13
0
 def test_02_login(self):
     '''小影账号登录后点击编辑按钮'''
     creation.creation_page().click_my_btn()
     login.login_page().click_login_btn()
     login.login_page().click_qq()
     self.assertTrue(
         self.d(
             resourceId="com.quvideo.xiaoying:id/studio_title_text").wait())
     print("登录成功")
     # 进入创作页,点击编辑
     creation.creation_page().click_creation_btn()
     while self.d(resourceId="com.quvideo.xiaoying:id/btn_vip").wait(
             timeout=2):
         creation.creation_page().click_edit_btn()
     # if self.d(resourceId="com.quvideo.xiaoying:id/vip_home_help_dialog_skip").click_exists(timeout=3):
     #     creation.creation_page().click_edit_btn()
     self.assertTrue(
         self.d(resourceId="com.quvideo.xiaoying:id/gallery_chooser_layout"
                ).wait(timeout=5))
     print("打开gallery成功")