51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1253|回复: 7
打印 上一主题 下一主题

[python] appium

[复制链接]
  • TA的每日心情
    开心
    2018-7-13 10:06
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    跳转到指定楼层
    1#
    发表于 2019-8-28 14:40:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    请问这中问题,怎么解决啊
    POST /wd/hub/session
    [HTTP] {"desiredCapabilities":{"appActivity":"com.xjlmh.classic/com.maibaapp.module.main.activity.GuideActivity","appPackage":"com.xjlmh.classic","automationName":"UiAutomator2","connectHardwareKeyboard":"True","deviceName":"MI CC9","platformName":"Android","platformVersion":9,"newCommandTimeout":0}}
    [MJSONWP] Calling AppiumDriver.createSession() with args: [{"appActivity":"com.xjlmh.classic/com.maibaapp.module.main.activity.GuideActivity","appPackage":"com.xjlmh.classic","automationName":"UiAutomator2","connectHardwareKeyboard":"True","deviceName":"MI CC9","platformName":"Android","platformVersion":9,"newCommandTimeout":0},null,null]
    [BaseDriver] Event 'newSessionRequested' logged at 1566973789722 (14:29:49 GMT+0800 (CST))
    [Appium] Appium v1.13.0 creating new AndroidUiautomator2Driver (v1.33.1) session
    [Appium] Capabilities:
    [Appium]   appActivity: com.xjlmh.classic/com.maibaapp.module.main.activity.GuideActivity
    [Appium]   appPackage: com.xjlmh.classic
    [Appium]   automationName: UiAutomator2
    [Appium]   connectHardwareKeyboard: True
    [Appium]   deviceName: MI CC9
    [Appium]   platformName: Android
    [Appium]   platformVersion: 9
    [Appium]   newCommandTimeout: 0
    [BaseDriver] Creating session with MJSONWP desired capabilities: {"appActivity":"com.xjlmh.c...
    [BaseDriver] The following capabilities were provided, but are not recognized by appium: connectHardwareKeyboard.
    [BaseDriver] Session created with session id: d56b1738-f8e4-4f5c-ae9b-d871cdb9edd8
    [ADB] Using 'adb' from '/usr/local/Caskroom/android-sdk/platform-tools/adb'
    [AndroidDriver] Retrieving device list
    [ADB] Trying to find a connected android device
    [ADB] Getting connected devices...
    [ADB] 1 device(s) connected
    [AndroidDriver] Looking for a device with Android '9'
    [ADB] Setting device id to d21db3c
    [ADB] Getting device platform version
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell getprop ro.build.version.release'
    [ADB] Current device property 'ro.build.version.release': 9
    [AndroidDriver] Using device: d21db3c
    [ADB] Using 'adb' from '/usr/local/Caskroom/android-sdk/platform-tools/adb'
    [ADB] Setting device id to d21db3c
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell getprop ro.build.version.sdk'
    [ADB] Current device property 'ro.build.version.sdk': 28
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell getprop ro.build.version.release'
    [ADB] Current device property 'ro.build.version.release': 9
    [ADB] Device API level: 28
    [UiAutomator2] Relaxing hidden api policy
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings put global hidden_api_policy_pre_p_apps 1'
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings put global hidden_api_policy_p_apps 1'
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings put global hidden_api_policy 1'
    [AndroidDriver] No app sent in, not parsing package/activity
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c wait-for-device'
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell echo ping'
    [AndroidDriver] Pushing settings apk to device...
    [ADB] Getting install status for io.appium.settings
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell dumpsys package io.appium.settings'
    [ADB] 'io.appium.settings' is installed
    [ADB] Getting package info for 'io.appium.settings'
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell dumpsys package io.appium.settings'
    [ADB] Getting install status for io.appium.settings
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell dumpsys package io.appium.settings'
    [ADB] 'io.appium.settings' is installed
    [ADB] Getting package info for 'io.appium.settings'
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell dumpsys package io.appium.settings'
    [UiAutomator2] Deleting UiAutomator2 session
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell am force-stop com.xjlmh.classic'
    [ADB] Removing forwarded port socket connection: 8200
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c forward --remove tcp\:8200'
    [UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c forward --remove tcp\:8200' exited with code 1'; Stderr: 'adb: error: listener 'tcp:8200' not found'; Code: '1''
    [UiAutomator2] Restoring hidden api policy to the device default configuration
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings delete global hidden_api_policy_pre_p_apps'
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings delete global hidden_api_policy_p_apps'
    [ADB] Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings delete global hidden_api_policy'
    [BaseDriver] Event 'newSessionStarted' logged at 1566973791068 (14:29:51 GMT+0800 (CST))
    [MJSONWP] Encountered internal error running command: Error: Could not find 'aapt' in ["/usr/local/Caskroom/android-sdk/platform-tools/aapt","/usr/local/Caskroom/android-sdk/emulator/aapt","/usr/local/Caskroom/android-sdk/tools/aapt","/usr/local/Caskroom/android-sdk/tools/bin/aapt","/usr/local/Caskroom/android-sdk/build-tools/lib64/aapt","/usr/local/Caskroom/android-sdk/build-tools/zipalign/aapt","/usr/local/Caskroom/android-sdk/build-tools/package.xml/aapt","/usr/local/Caskroom/android-sdk/build-tools/mainDexClasses/aapt","/usr/local/Caskroom/android-sdk/build-tools/aidl/aapt","/usr/local/Caskroom/android-sdk/build-tools/arm-linux-androideabi-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/bcc_compat/aapt","/usr/local/Caskroom/android-sdk/build-tools/core-lambda-stubs.jar/aapt","/usr/local/Caskroom/android-sdk/build-tools/d8/aapt","/usr/local/Caskroom/android-sdk/build-tools/dexdump/aapt","/usr/local/Caskroom/android-sdk/build-tools/dx/aapt","/usr/local/Caskroom/android-sdk/build-tools/i686-linux-android-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/lib/aapt","/usr/local/Caskroom/android-sdk/build-tools/x86_64-linux-android-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/llvm-rs-cc/aapt","/usr/local/Caskroom/android-sdk/build-tools/apksigner/aapt","/usr/local/Caskroom/android-sdk/build-tools/mainDexClasses.rules/aapt","/usr/local/Caskroom/android-sdk/build-tools/mainDexClassesNoAapt.rules/aapt","/usr/local/Caskroom/android-sdk/build-tools/mipsel-linux-android-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/split-select/aapt","/usr/local/Caskroom/android-sdk/build-tools/source.properties/aapt","/usr/local/Caskroom/android-sdk/build-tools/renderscript/aapt","/usr/local/Caskroom/android-sdk/build-tools/runtime.properties/aapt","/usr/local/Caskroom/android-sdk/build-tools/aarch64-linux-android-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/aapt2/aapt","/usr/local/Caskroom/android-sdk/build-tools/aapt/aapt","/usr/local/Caskroom/android-sdk/build-tools/NOTICE.txt/aapt"]. Do you have Android Build Tools installed at '/usr/local/Caskroom/android-sdk'?
    [MJSONWP]     at ADB. (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:106:11)
    [MJSONWP]     at Generator.next ()
    [MJSONWP]     at asyncGeneratorStep (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    [MJSONWP]     at _next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    [MJSONWP]     at run (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/core-js/modules/es6.promise.js:75:22)
    [MJSONWP]     at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/core-js/modules/es6.promise.js:92:30
    [MJSONWP]     at flush (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/core-js/modules/_microtask.js:18:9)
    [MJSONWP]     at process._tickCallback (internal/process/next_tick.js:61:11)
    [HTTP] <-- POST /wd/hub/session 500 1349 ms - 2251
    [HTTP]
    [HTTP] --> DELETE /wd/hub/session
    [HTTP] {}
    [HTTP] No route found. Setting content type to 'text/plain'
    [HTTP] <-- DELETE /wd/hub/session 404 1 ms - 57
    [HTTP]
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

  • TA的每日心情
    慵懒
    昨天 10:15
  • 签到天数: 1521 天

    连续签到: 5 天

    [LV.Master]测试大本营

    2#
    发表于 2019-8-30 10:27:14 | 只看该作者
    检查下环境和路径及名称
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    昨天 13:15
  • 签到天数: 996 天

    连续签到: 5 天

    [LV.10]测试总司令

    3#
    发表于 2019-8-30 11:52:52 | 只看该作者
    服务器挂了?或者是地址配错了吧
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    3 小时前
  • 签到天数: 2818 天

    连续签到: 6 天

    [LV.Master]测试大本营

    4#
    发表于 2019-8-30 12:05:23 | 只看该作者
    看error日志
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    昨天 13:15
  • 签到天数: 996 天

    连续签到: 5 天

    [LV.10]测试总司令

    5#
    发表于 2019-8-30 13:32:04 | 只看该作者
    看下服务器情况
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    昨天 10:39
  • 签到天数: 366 天

    连续签到: 5 天

    [LV.9]测试副司令

    6#
    发表于 2019-8-30 15:25:02 | 只看该作者
    配置错了吧
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-7-13 10:06
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    7#
     楼主| 发表于 2019-9-12 14:23:45 | 只看该作者
    这个问题,我解决了,复制了一个aapt文件到platform-tools下面就好了
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-7-13 10:06
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    8#
     楼主| 发表于 2019-9-12 14:25:23 | 只看该作者
    我弄好了,复制了一个aapt文件到platform-tools文件夹下面就好了
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-23 11:18 , Processed in 0.072121 second(s), 22 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表