• @seveniruby@rabbit@lihuazhang 求请教哇

  • xpath 使用误区,请进 at 2014年02月25日

    #5 楼 @seveniruby 请问 'device'=>'selendroid 下不支持 xpath 么 同样的 xpath 在'device'=>'android 下就支持

  • #3 楼 @seveniruby 验证了 4.4 的 好似不可以哦,debug: Appium request initiated at /wd/hub/session/1bd437bc-937f-4984-b598-07d56
    dee09f0/element
    debug: Request received with params: {"using":"id","value":"btnSearchOnTitle"}
    info: Pushing command to appium work queue: ["find",{"strategy":"id","selector":
    "btnSearchOnTitle","context":"","multiple":false}]
    info: [BOOTSTRAP] [info] Got data from client: {"cmd":"action","action":"find","
    params":{"strategy":"id","selector":"btnSearchOnTitle","context":"","multiple":f
    alse}}
    info: [BOOTSTRAP] [info] Got command of type ACTION
    info: [BOOTSTRAP] [debug] Got command action: find
    info: [BOOTSTRAP] [debug] Finding btnSearchOnTitle using ID with the contextId:

    info: [BOOTSTRAP] [info] Returning result: {"value":"Could not find an element u
    sing supplied strategy. ID btnSearchOnTitle doesn't exist as text or content d
    esc.","status":13}
    info: Responding to client with error: {"status":13,"value":{"message":"An unkno
    wn server-side error occurred while processing the command.","origValue":"Could
    not find an element using supplied strategy. ID btnSearchOnTitle doesn't exist
    as text or content desc."},"sessionId":"1bd437bc-937f-4984-b598-07d56dee09f0"}
    POST /wd/hub/session/1bd437bc-937f-4984-b598-07d56dee09f0/element 500 6208ms - 3
    08b

  • xpath 使用误区,请进 at 2014年02月25日

    'device'=>'Android‘ 不支持@driver.find_element(:id,'btnSearchOnTitle') ????

  • xpath 使用误区,请进 at 2014年02月25日

    #2 楼 @seveniruby 顺便发现 'device'=>'selendroid',#selendroid Android 两种模式下 xpath 获取的方法有别

  • xpath 使用误区,请进 at 2014年02月25日

    #1 楼 @lihuazhang 跳过一个没关系的 //HorizontalScrollView/LinerLayout /TextView 结果是一样的

  • xpath 使用误区,请进 at 2014年02月25日

    #2 楼 @seveniruby 确认了 ,是 6 个中的第一个 囧 我觉得 xpath 可能匹配的是整体串

  • 话说 为啥 selendroid 模式下 用的是 8080 端口呢

  • 附加上 log:Error: socket hang up
    at createHangUpError (http.js:1473:15)
    at Socket.socketOnEnd as onend
    at Socket.g (events.js:175:14)
    at Socket.EventEmitter.emit (events.js:117:20)
    at streamreadable.js:920:16
    at process._tickCallback (node.js:415:13)
    info: Didn't get a new command in 60 secs, shutting down...
    info: Shutting down appium session...
    info: Stopping selendroid server
    info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session

  • @seveniruby 最近有个问题 一直困扰 不知道如何解决 在使用 selendroid 在对屏幕进行截图的时,使用一句 driver.save_screenshot(File.dirname(FILE)+'/screenshot/Right1.png') 报错: socket hang up 同样 在 android 模式下 就是成功的 真是不知道哪里出了问题

  • http://selendroid.io/setup.htmljdk 配置问题单独调了下,最后发现 囧

  • @seveniruby 对 Selendroid 不太熟悉,求插桩的那个命令,apk 是可以编译的,我用了 Selendroid 的测试 apk,问题任然存在,我发现这里有个包 C:\Windows\Temp\selendroid.io.selendroid.testapp.apk
    第一次运行产生这个包 但是报错 error: uncaughtException: Arguments to path.resolve must be strings date=Tue Jan
    14 2014 19:30:43 GMT+0800 (中国标准时间), pid=9172, uid=null, gid=null, cwd=C:\
    Users\chuyaoyao\Downloads\AppiumForWindows\Appium\node_modules\appium, execPath=
    C:\Users\chuyaoyao\Downloads\AppiumForWindows\Appium\node.exe, version=v0.10.17,
    argv=[C:\Users\chuyaoyao\Downloads\AppiumForWindows\Appium\node.exe, C:\Users\c
    huyaoyao\Downloads\AppiumForWindows\Appium\node_modules\appium\lib\server\main.j
    s, --address, 127.0.0.1, --port, 4723, --app, C:\Users\chuyaoyao\Downloads\Appiu
    mForWindows\Appium\apk\selendroid-test-app-0.7.0.apk, --app-activity, .HomeScree
    nActivity, --app-pkg, io.selendroid.testapp, --no-reset], rss=42115072, heapTota
    l=31562572, heapUsed=17334036, loadavg=[0, 0, 0], uptime=6235.2632985, trace=[co
    lumn=15, file=path.js, function=Object.exports.resolve, line=116, method=exports
    .resolve, native=false, column=23, file=C:\Users\chuyaoyao\Downloads\AppiumForWi
    ndows\Appium\node_modules\appium\lib\devices\android\adb.js, function=moveManife
    st, line=197, method=null, native=false, column=20, file=C:\Users\chuyaoyao\Down
    loads\AppiumForWindows\Appium\node_modules\appium\lib\devices\android\adb.js, fu
    nction=null, line=235, method=null, native=false, column=21, file=C:\Users\chuya
    oyao\Downloads\AppiumForWindows\Appium\node_modules\appium\node_modules\async\li
    b\async.js, function=null, line=548, method=null, native=false, column=13, file=
    C:\Users\chuyaoyao\Downloads\AppiumForWindows\Appium\node_modules\appium\node_mo
    dules\async\lib\async.js, function=null, line=224, method=null, native=false, co
    lumn=13, file=C:\Users\chuyaoyao\Downloads\AppiumForWindows\Appium\node_modules\
    appium\node_modules\async\lib\async.js, function=iterate, line=131, method=null,
    native=false, column=25, file=C:\Users\chuyaoyao\Downloads\AppiumForWindows\App
    ium\node_modules\appium\node_modules\async\lib\async.js, function=null, line=142
    , method=null, native=false, column=17, file=C:\Users\chuyaoyao\Downloads\Appium
    ForWindows\Appium\node_modules\appium\node_modules\async\lib\async.js, function=
    null, line=226, method=null, native=false, column=34, file=C:\Users\chuyaoyao\Do
    wnloads\AppiumForWindows\Appium\node_modules\appium\node_modules\async\lib\async
    .js, function=null, line=553, method=null, native=false, column=7, file=C:\Users
    \chuyaoyao\Downloads\AppiumForWindows\Appium\node_modules\appium\lib\helpers.js,
    function=exports.testZipArchive, line=79, method=testZipArchive, native=false],
    stack=[TypeError: Arguments to path.resolve must be strings, at Object.expo
    rts.resolve (path.js:116:15), at moveManifest (C:\Users\chuyaoyao\Downloads\
    AppiumForWindows\Appium\node_modules\appium\lib\devices\android\adb.js:197:23),
    at C:\Users\chuyaoyao\Downloads\AppiumForWindows\Appium\node_modules\appium\
    lib\devices\android\adb.js:235:20, at C:\Users\chuyaoyao\Downloads\AppiumFor
    Windows\Appium\node_modules\appium\node_modules\async\lib\async.js:548:21, a
    t C:\Users\chuyaoyao\Downloads\AppiumForWindows\Appium\node_modules\appium\node_
    modules\async\lib\async.js:224:13, at iterate (C:\Users\chuyaoyao\Downloads\
    AppiumForWindows\Appium\node_modules\appium\node_modules\async\lib\async.js:131:
    13), at C:\Users\chuyaoyao\Downloads\AppiumForWindows\Appium\node_modules\ap
    pium\node_modules\async\lib\async.js:142:25, at C:\Users\chuyaoyao\Downloads
    \AppiumForWindows\Appium\node_modules\appium\node_modules\async\lib\async.js:226
    :17, at C:\Users\chuyaoyao\Downloads\AppiumForWindows\Appium\node_modules\ap
    pium\node_modules\async\lib\async.js:553:34, at exports.testZipArchive (C:\U
    sers\chuyaoyao\Downloads\AppiumForWindows\Appium\node_modules\appium\lib\helpers
    .js:79:7)]
    第二次运行 就报上一个错误了

  • @seveniruby 请教一个问题,在使用 Selendroid 模式时,启动出错,内容如下 error: android.util.AndroidException: INSTRUMENTATION_FAILED: com.baidu.news.sel
    endroid/io.selendroid.ServerInstrumentation

    at com.android.commands.am.Am.runInstrument(Am.java:616)

    at com.android.commands.am.Am.run(Am.java:118)

    at com.android.commands.am.Am.main(Am.java:81)

    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)

    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:237)

    at dalvik.system.NativeStart.main(Native Method)

    info: Cleaning up appium session
    error: Failed to start an Appium session, err was: Error: android.util.AndroidEx
    ception: INSTRUMENTATION_FAILED: com.baidu.news.selendroid/io.selendroid.ServerI
    nstrumentation