一、运行错误

Android获取toast,需要在参数里设置automationName:Uiautomator2

 1     # 设置设备的信息
 2     desired_caps = {
 3         'platformName': 'Android',  # 平台
 4         'platformVersion': '5.1',  # 版本号
 5         'deviceName': 
 6         'appPackage': 
 7         'appActivity': 
 8         'unicodeKeyboard': 'True',  # 防止键盘中文不能输入
 9         'resetKeyboard': 'True',  # 重置设置生效
10         'automationName': 'Uiautomator2',
11         'noSign':'True'
12     }

 

在参数里设置后,运行脚本,提示Uiautomator2错误, 后经查询appium1.6.3以上才能识别toast,

于是去github官网下载最新版本:https://github.com/appium/appium-desktop/releases,仍未解决;

几经折腾最后发现在安装appium-desktop的时候需要将安装模式设置为只为此用户安装,运行后没有在提示错误,正常运行

 

参考链接:https://testerhome.com/topics/15224

相关文章:

  • 2021-10-05
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-06-14
猜你喜欢
  • 2021-07-02
  • 2021-09-06
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2022-03-02
相关资源
相似解决方案