求助,请帮忙看下运行python测试代码提示断开连接
from appium import webdriverdesired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '6.0'
desired_caps['deviceName'] = 'OPPO A57'
#desired_caps['app'] = 'D:/'
desired_caps['appPackage'] = 'com.android.calculator2'
desired_caps['appActivity'] = '.Calculator'
print("android")
driver = webdriver.Remote('http://127.0.0.1:4724/wd/hub',desired_caps)
print("yilianjie")
driver.find_element_by_name("1").click
driver.find_element_by_name("5").click
driver.find_element_by_name("9").click
driver.find_element_by_name("9").click
driver.find_element_by_name("9").click
driver.find_element_by_name("+").click
driver.find_element_by_name("6").click
driver.find_element_by_name("6").click
driver.find_element_by_name("=").click
driver.qiut()
File "D:\Program Files\Python\lib\socket.py", line 586, in readinto
return self._sock.recv_into(b)
ConnectionResetError: 远程主机强迫关闭了一个现有的连接。
关闭了主机,是不是Python版本的问题 通信连接错误 连接没有建立起来,可以抓一下包,看一下原因 感觉是通信问题,查看联通性 应该是通信问题.
页:
[1]