win8安装python3后不能编程_[新手求助]windows8.1 + python3.4 跑范例 contact 的 apk 死活连不上真机...

adb 连接情况如图示

连接代码

def setUp(self):

desired_caps = {}

desired_caps['platformName'] = 'Android'

desired_caps['platformVersion'] = '4.4.2'

desired_caps['deviceName'] = '13b7ef9d'

desired_caps['app'] = PATH(

'C:\pythonex\ContactManager.apk'

)

desired_caps['appPackage'] = 'com.example.android.contactmanager'

desired_caps['appActivity'] = '.ContactManager'

self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)

python显示报错信息

Traceback (most recent call last):

File "C:\Python34\android_contacts.py", line 24, in setUp

self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)

File "C:\Python34\lib\site-packages\appium\webdriver\webdriver.py", line 35, in init

super(WebDriver, self).init(command_executor, desired_capabilities, browser_profile, proxy, keep_alive)

File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 73, in init

self.start_session(desired_capabilities, browser_profile)

File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 121, in start_session

'desiredCapabilities': desired_capabilities,

File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 173, in execute

self.error_handler.check_response(response)

File "C:\Python34\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 164, in check_response

raise exception_class(message, screen, stacktrace)

selenium.common.exceptions.WebDriverException: Message: 'A new session could not be created. (Original error: Could not find a connected Android device.)'

appium报错信息

ERROR: debug: executing: "C:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe" kill-server

warn: code=ENOENT, errno=ENOENT, syscall=spawn

ERROR: error: Error killing ADB server, going to see if it's online anyway

warn: code=ENOENT, errno=ENOENT, syscall=spawn

ERROR: debug: executing: "C:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe" devices

info: Sent shutdown command, waiting for UiAutomator to stop...

warn: UiAutomator did not shut down fast enough, calling it gone

ERROR: error: Failed to start an Appium session, err was: Error: Could not find a connected Android device.

info: Cleaning up android objects

info: Cleaning up appium session

info: Error: Could not find a connected Android device.

at ADB.getDevicesWithRetry (C:\appium\node_modules\appium\lib\devices\android\adb.js:599:15)

at androidCommon.prepareActiveDevice (C:\appium\node_modules\appium\lib\devices\android\android-common.js:338:12)

at null. (C:\appium\node_modules\appium\lib\devices\android\android-common.js:279:26)

at C:\appium\node_modules\appium\node_modules\async\lib\async.js:610:21

at C:\appium\node_modules\appium\node_modules\async\lib\async.js:249:17

at iterate (C:\appium\node_modules\appium\node_modules\async\lib\async.js:149:13)

at C:\appium\node_modules\appium\node_modules\async\lib\async.js:160:25

at C:\appium\node_modules\appium\node_modules\async\lib\async.js:251:21

at C:\appium\node_modules\appium\node_modules\async\lib\async.js:615:34

at androidCommon.prepareEmulator (C:\appium\node_modules\appium\lib\devices\android\android-common.js:329:5)

info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not find a connected Android device.)","origValue":"Could not find a connected Android device."},"sessionId":null}

POST /wd/hub/session 500 27428ms - 234b

Killed Node Server.

Node Server Process Ended

求助,怎么才能连上真机启动调试,在线等,万分感谢

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值