def __get_audio_alltime_ele(self): # 最新酷我音乐界面分析 package_name = d.info['currentPackageName'] if package_name == 'cn.kuwo.kwmusiccar': return uit.get_ele_by_resourceId(package_name + ':id/tvTime') return uit.get_ele_by_resourceId(pkg_name + ':id/txt_alltime')
def back_from_kuwo(self): # package_name = d.info['currentPackageName'] back = uit.get_ele_by_resourceId( 'cn.kuwo.kwmusiccar:id/layoutPlayControlPanel') if back.wait.exists(): back.click.wait() else: uit.raise_Exception_info('从酷我返回到音乐控件不存在')
def __init__(self): # 新旧版本的pkgname判断 global pkg_name pkg_name = "com.pateonavi.naviapp" skip = uit.get_ele_by_resourceId(pkg_name + ':id/skip') if skip.wait.exists(): skip.click.wait()
def __get_audio_kuwo_name_ele(self): # 针对新版酷我音乐 package_name = d.info['currentPackageName'] if package_name == 'cn.kuwo.kwmusiccar': home = uit.get_ele_by_resourceId(package_name + ':id/layout_home') if home.wait.exists(): home.click.wait() ele = uit.get_ele_by_text('精选电台') if ele.wait.exists(): ele.click.wait() tj_ele = uit.get_ele_by_text('推荐') if tj_ele.wait.exists(): tj_ele.click.wait() return uit.get_ele_by_text('一人一首成名曲')
def __get_phone_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/app_phone')
def __get_navi_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/app_nav')
def __get_audio_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/app_music')
def get_navi_satellite_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/iv_satellite')
def __get_clock_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/ivoka_time_text')
def __get_qplay_local_drawer_ele(self): return uit.get_ele_by_resourceId('pateo.dls.qplay:id/drawer')
def __get_qplay_play_name_ele(self): return uit.get_ele_by_resourceId('pateo.dls.qplay:id/title')
def __get_video_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/app_video')
def __get_others_home_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/home')
def get_navi_search_city_bar_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/search_bar_img1')
def __get_car_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/app_car')
def get_navi_nearby_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/menu_nearby')
def get_navi_search_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/menu_search')
def get_navi_to_dest_time_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/tv_navigation_number')
def __get_navi_home_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/go_home')
def get_navi_zoomSeekBar_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/zoomSeekBar')
def __get_service_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/app_service')
def get_navi_search_cancel_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/search_cancel')
def __get_others_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/app_mobile')
def get_navi_search_city_list_item(self): return uit.get_ele_by_resourceId(pkg_name + ':id/list_item_tip')
def __get_qplay_selector_ele(self): return uit.get_ele_by_resourceId( 'pateo.dls.qplay:drawable/selector_menu_local')
def __get_menu_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/all_app_home_button')
def __get_qplay_local_name_ele(self): return uit.get_ele_by_resourceId( 'pateo.dls.qplay:id/drawer_list_category_text')
def __get_tip_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/air_quality_text')
def __get_qplay_home_ele(self): return uit.get_ele_by_resourceId( 'pateo.dls.qplay:drawable/selector_button_home')
def __get_temperature_ele(self): return uit.get_ele_by_resourceId(pkg_name + ':id/temperature_icon')