Appium|Locator Strategy ... is not supported for this session

appim server log

InvalidSelectorError: Locator Strategy 'xpath,//android.widget.TextView[@resource-id='xxx.xxx.xxx:id/sign_out_tv' and @text='退出当前账号']' is not supported for this session

原因

sign_out_loc = (By.XPATH,"//android.widget.TextView[@resource-id='xxx.xxx.xxx:id/sign_out_tv' and @text='退出当前账号']")

直接调用 sign_out_loc .click()方法导致

解决办法:先调用find_element方法,返回element对象后再调用click()方法

Appium|Locator Strategy ... is not supported for this session

上一篇:从零开始实现ASP.NET Core MVC的插件式开发(一) - 使用ApplicationPart动态加载控制器和视图


下一篇:Android 4.x 获取存储卡路径的方式