测试积点老人 发表于 2021-7-7 15:16:44

appium自动化过程中重启设备后appium进程退出?

首先定义好driver
desired_caps = {}
desired_caps[‘platformName’] = ‘Android’
desired_caps[‘deviceName’] = device
driver = webdriver.Remote(‘http://127.0.0.1:4723/wd/hub’, desired_caps)
driver.implicitly_wait(20)重启设备并等待设备启动后执行元素查找
os.popen(“adb reboot”)
WebDriverWait(driver, time).until(lambda x: x.find_element(by, value))报错
Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: ‘POST /element’ cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details

海海豚 发表于 2021-7-8 09:11:54

看下服务日志里报的错

bellas 发表于 2021-7-8 10:19:43

看下输出日志

qqq911 发表于 2021-7-8 10:33:05

对应进程没有找到

郭小贱 发表于 2021-7-8 16:44:28

Check the server log and/or the logcat output for more details,看看具体什么愿意呢。

msnshow 发表于 2021-7-11 17:42:41

应该要重新跑一下连接才行,你都断开了adb ,UiAutomator2 的连接就断开了
页: [1]
查看完整版本: appium自动化过程中重启设备后appium进程退出?