还未发布过话题
  • Appium 入门到原理合集 at 2015年09月16日

    我遇到个低级问题,求大侠帮忙,代码如下
    PATH = lambda p: os.path.abspath(
    os.path.join(os.path.dirname(file), p)
    )

    desired_caps = {}
    desired_caps['device'] = 'Android'
    desired_caps['platformName'] = 'Android'
    desired_caps['deviceName'] = 'a2319441'
    desired_caps['platformVersion'] = '4.4.2'
    desired_caps['app'] =PATH("d:\xx.apk")
    desired_caps['appPackage'] = 'com.android.XX'
    desired_caps['appActivity'] = 'Activity'

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

    appium 报错,而且有乱码,日志如下:
    info: Client User-Agent string: Python-urllib/2.7

    info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : device
    info: [debug] Using local app from desired caps: d:\QunarGonglue_android_C1000_beta_60003200_201508281809.apk
    info: [debug] Creating new appium session a62b6b7b-d456-4d4e-8f3c-711bb84cdff1
    info: Starting android appium
    info: [debug] Getting Java version
    error: Failed to start an Appium session, err was: Error: 'java -version' failed. Error: Command failed: 'java' 锟斤拷锟斤拷锟节诧拷锟斤拷锟解部锟斤拷锟筋,也锟斤拷锟角匡拷锟斤拷锟叫的筹拷锟斤拷
    锟斤拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷

    info: [debug] Cleaning up appium session
    info: [debug] Error: 'java -version' failed. Error: Command failed: 'java' 锟斤拷锟斤拷锟节诧拷锟斤拷锟解部锟斤拷锟筋,也锟斤拷锟角匡拷锟斤拷锟叫的筹拷锟斤拷
    锟斤拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷

    at C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android-common.js:1032:17
    at ChildProcess.exithandler (child_process.js:641:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)
    info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: 'java -