qq_18402969
qq_18402969
2017-12-18 08:59

求助,请帮忙看下运行python测试代码提示断开连接

5
  • app
  • python
  • 测试
  • android

from appium import webdriver

desired_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: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答