折腾:
【未解决】开启和运行另外一个设备id是1的红米Note8Pro的自动化测试安卓项目环境
期间,后续又报错:
[201208 14:45:37][AppCrawler.py 110] crawl com.hero.lszt.vivo/绿色征途 start [W 201208 14:45:37 watcher:181] already started [201208 14:45:37][DevicesMethods.py 151] start com.hero.lszt.vivo [201208 14:45:37][AppCrawler.py 90 ] package "com.hero.lszt.vivo" not found Traceback (most recent call last): File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/src/AppCrawler.py", line 83, in start self.init_account(item) File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/src/AppCrawler.py", line 111, in init_account self.start_app() File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/src/common/DevicesMethods.py", line 180, in start_app self.driver.app_start(self.appPackage, stop=self.config["IsForceStop"]) File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/venv/lib/python3.8/site-packages/uiautomator2/__init__.py", line 1335, in app_start """ Launch application File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/venv/lib/python3.8/site-packages/uiautomator2/__init__.py", line 1479, in app_info Get app info uiautomator2.exceptions.BaseError: package "com.hero.lszt.vivo" not found
这个是uiautomator2报错,
找不到包名,那估计是没安装
那就重新安装。
结果后续又报错:
201208 14:45:39][AppCrawler.py 110] crawl com.zlongame.fzdl.vivo/风之大陆 start [W 201208 14:45:39 watcher:181] already started [201208 14:45:39][DevicesMethods.py 151] start com.zlongame.fzdl.vivo [I 201208 14:45:39 __init__:258] USB disconnected, fallback to WiFi, ATX_AGENT_URL=http://192.168.31.177:7912 [I 201208 14:45:39 __init__:258] USB disconnected, fallback to WiFi, ATX_AGENT_URL=http://192.168.31.177:7912 [201208 14:45:39][AppCrawler.py 90 ] package "com.zlongame.fzdl.vivo" not found Traceback (most recent call last): File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/src/AppCrawler.py", line 83, in start self.init_account(item) File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/src/AppCrawler.py", line 111, in init_account self.start_app() File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/src/common/DevicesMethods.py", line 180, in start_app self.driver.app_start(self.appPackage, stop=self.config["IsForceStop"]) File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/venv/lib/python3.8/site-packages/uiautomator2/__init__.py", line 1335, in app_start """ Launch application File "/Users/xxx/dev/xxx/crawler/appAutoCrawler/AppCrawler/venv/lib/python3.8/site-packages/uiautomator2/__init__.py", line 1479, in app_info Get app info uiautomator2.exceptions.BaseError: package "com.zlongame.fzdl.vivo" not found
所以感觉是ATX和uiautomator2的问题
所以去:
【已解决】安卓自动化测试:重新卸载和安装uiautomator2:ATX和com.github.uiautomator.test
结果问题依旧。
转载请注明:在路上 » 【未解决】安卓自动化测试报错:uiautomator2.exceptions.BaseError package not found