コード例 #1
0
def step_impl(context):  # 新加步骤

    # 判断是否在播放界面
    view_full = Video().get_aqy_video_view_full()
    if view_full.exists:
        back_video = Video().get_aqy_playing_back()
        if not back_video.exists:
            d.click(320, 320)

        if back_video.wait.exists():
            back_video.click.wait()

    # 判断是否在搜索界面,如果在搜索界面先取消搜索
    cancel_ele = d(text='取消')
    if cancel_ele.exists:
        cancel_ele.click.wait()

    # 判断是否在本地视频列表界面,如果在,返回
    back_top_menu = Video().get_back_to_top_menu()
    if back_top_menu.exists:
        back_top_menu.click.wait()

    # 获取左侧菜单
    left_menu = Video().get_aqy_left_menu_frame()
    if left_menu.wait.exists():
        x = left_menu.info['bounds']['right']
        y = left_menu.info['bounds']['bottom']
        d.swipe(x, int(y) / 2, 0, int(y) / 2, 15)

    top_menu = Video().get_aqy_home_top_menu()
    if top_menu.wait.exists():
        top_menu.click.wait()
    else:
        Utils().raise_Exception_info('爱奇艺顶部菜单不存在')
コード例 #2
0
ファイル: radio.py プロジェクト: ouguangqian/ipdaautotest
 def scroll_radio_weitiao_ele(self):
     ele = Radio().get_radio_weitiao_ele()
     if ele.wait.exists():
         x = (int(ele.info['bounds']['left']) + int(ele.info['bounds']['right'])) / 2
         y = (int(ele.info['bounds']['bottom']) + int(ele.info['bounds']['top'])) / 2
         d.swipe(x, y, x + 200, y)
     else:
         Utils().raise_Exception_info('微调控件不存在')
コード例 #3
0
 def hide_qplay_local_drawer_ele(self):
     ele = self.__get_qplay_local_drawer_ele()
     if ele.exists:
         #         获取窗口坐标
         x = ele.info['bounds']['right']
         y = int(ele.info['bounds']['bottom']) / 2
         # 滑动隐藏
         d.swipe(x, y, 0, y, 30)
     else:
         uit.raise_Exception_info('qplay本地歌曲窗口不存在')
コード例 #4
0
 def hide_video_find_channel_drawer_ele(self):
     ele = self.__get_video_find_channel_drawer_ele()
     if ele.wait.exists():
         # 获取窗口坐标
         x = ele.info['bounds']['right']
         y = int(ele.info['bounds']['bottom']) / 2
         # 滑动
         d.swipe(x, y, 0, y, 30)
     else:
         Utils().raise_Exception_info('视频栏目不存在')
コード例 #5
0
ファイル: audio.py プロジェクト: sdy8181/autotestproject
 def hide_audio_mine_drawer(self):
     ele = self.__get_audio_mine_drawer_ele()
     if ele.wait.exists():
         # 获取窗口坐标
         x = ele.info['bounds']['right']
         y = int(ele.info['bounds']['bottom']) / 2
         # 滑动
         d.swipe(x, y, 0, y, 30)
     else:
         uit.raise_Exception_info('我的音乐库窗口不存在')
コード例 #6
0
ファイル: radio.py プロジェクト: ouguangqian/ipdaautotest
 def hide_radio_list_drawer_ele(self):
     ele = self.__get_radio_list_drawer_ele()
     if ele.wait.exists():
         #         获取窗口坐标
         x = ele.info['bounds']['right']
         y = int(ele.info['bounds']['bottom']) / 2
         # 滑动隐藏
         d.swipe(x, y, 0, y, 30)
     else:
         Utils().raise_Exception_info('收音机列表窗口不存在')
コード例 #7
0
ファイル: radio.py プロジェクト: sdy8181/autotestproject
 def hide_radio_selector_drawer_ele(self):
     ele = self.__get_radio_selector_drawer_ele()
     if ele.wait.exists():
         # 获取窗口坐标
         x = ele.info['bounds']['right']
         y = int(ele.info['bounds']['bottom']) / 2
         # 滑动隐藏
         d.swipe(x, y, 0, y, 30)
     else:
         uit.raise_Exception_info('FM/AM列表选择窗口不存在')
コード例 #8
0
def step_impl(context):  # 新加步骤
    # 获取左侧菜单
    left_menu = Video().get_aqy_left_menu_frame()
    if left_menu.wait.exists():
        x = left_menu.info['bounds']['right']
        y = left_menu.info['bounds']['bottom']
        d.swipe(x, int(y) / 2, 0, int(y) / 2, 15)

    top_menu = Video().get_aqy_home_top_menu()
    if top_menu.wait.exists():
        top_menu.click.wait()
    else:
        uit.raise_Exception_info('爱奇艺顶部菜单不存在')
コード例 #9
0
    def click_system_setting_ele(self):

        d.swipe(640, 0, 640, 720, 15)
        time.sleep(2)
        d.click(1200, 90)
        time.sleep(2)