appium自动化过程中重启设备后appium进程退出?
首先定义好driverdesired_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
看下服务日志里报的错 看下输出日志 对应进程没有找到 Check the server log and/or the logcat output for more details,看看具体什么愿意呢。 应该要重新跑一下连接才行,你都断开了adb ,UiAutomator2 的连接就断开了
页:
[1]