def step_impl(context): curroad = Navi().get_navi_current_road_name_ele() search = Navi().get_navi_search_ele() if search.wait.exists(): search.click.wait() elif curroad.wait.exists(): curroad.click() search.click.wait() else: Utils().raise_Exception_info('导航搜索控件打开失败')
def step_impl(context): addr = context.table[0]['address'] if str(addr).startswith('o_'): addr = Utils().get_context_map(addr) # 获取删除控件并点击 del_ele = Navi().get_navi_his_fav_del_ele(addr) if del_ele.wait.exists(): del_ele.click() # 点击完成控件 完成删除操作 ok_ele = d(text='完成') if ok_ele.wait.exists(): ok_ele.click()
def step_impl(context): fav_ele = Navi().get_navi_ready_dest_fav_ele() if fav_ele.wait.exists(): fav_ele.click() else: Utils().raise_Exception_info('地址收藏控件不可见')