• 学到了,谢谢

  • @JasonChang 这边的inspector是怎么打开的,求指导

  • @xiguamaomaoqiu 我这边不用那个了,我自己找的app-inspector,并配置环境,之后使用app-inspector抓取元素

  • @gloria0610 我这边WDAinspector打开时,WDA会报这样的错误

  • @gloria0610 你有遇到过这种情况吗?完全不看不懂。。。。

  • 我这边用http://192.168.20.184:8100/inspector查看元素,显示的是这样的
    {
    "value" : "Invalid parameter not satisfying: path\n\n(\n\t0 CoreFoundation 0x00000001838b6dc8 + 148\n\t1 libobjc.A.dylib 0x0000000182f1bf80 objc_exception_throw + 56\n\t2 CoreFoundation 0x00000001838b6c80 + 0\n\t3 Foundation 0x000000018423c154 + 112\n\t4 WebDriverAgentLib 0x000000010686715c -[FBResponseFilePayload initWithFilePath:] + 284\n\t5 WebDriverAgentLib 0x0000000106862470 FBResponseFileWithPath + 84\n\t6 WebDriverAgentLib 0x00000001068743c0 __29+[FBInspectorCommands routes]_block_invoke + 100\n\t7 WebDriverAgentLib 0x0000000106862790 -[FBRoute_Sync mountRequest:intoResponse:] + 168\n\t8 WebDriverAgentLib 0x0000000106859598 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 496\n\t9 RoutingHTTPServer 0x000000010691e3cc -[RoutingHTTPServer handleRoute:withRequest:response:] + 144\n\t10 RoutingHTTPServer 0x000000010691eb80 __72-[RoutingHTTPServer routeMethod:withPath:parameters:request:connection:]_block_invoke + 44\n\t11 libdispatch.dylib 0x000000018330147c + 16\n\t12 libdispatch.dylib 0x0000000183310ae8 + 644\n\t13 libdispatch.dylib 0x000000018330147c + 16\n\t14 libdispatch.dylib 0x0000000183306b84 _dispatch_main_queue_callback_4CF + 1844\n\t15 CoreFoundation 0x000000018386cd50 + 12\n\t16 CoreFoundation 0x000000018386abb8 + 1628\n\t17 CoreFoundation 0x0000000183794c50 CFRunLoopRunSpecific + 384\n\t18 Foundation 0x00000001841a4cfc + 308\n\t19 Foundation 0x00000001841fa030 + 88\n\t20 WebDriverAgentLib 0x00000001068585f0 -[FBWebServer startServing] + 320\n\t21 WebDriverAgentRunner 0x00000001021cbed0 -[UITestingUITests testRunner] + 120\n\t22 CoreFoundation 0x00000001838bca60 + 144\n\t23 CoreFoundation 0x00000001837b4488 + 284\n\t24 XCTest 0x00000001000de0a8 __24-[XCTestCase invokeTest]_block_invoke_2 + 388\n\t25 XCTest 0x0000000100112c98 -[XCTestContext performInScope:] + 208\n\t26 XCTest 0x00000001000ddf0c -[XCTestCase invokeTest] + 268\n\t27 XCTest 0x00000001000de5e0 -[XCTestCase performTest:] + 460\n\t28 XCTest 0x00000001000dba5c -[XCTestSuite performTest:] + 428\n\t29 XCTest 0x00000001000dba5c -[XCTestSuite performTest:] + 428\n\t30 XCTest 0x00000001000dba5c -[XCTestSuite performTest:] + 428\n\t31 XCTest 0x00000001000c7740 __25-[XCTestDriver _runSuite]_block_invoke + 56\n\t32 XCTest 0x00000001000e8260 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 528\n\t33 XCTest 0x00000001000c75d8 -[XCTestDriver _runSuite] + 460\n\t34 XCTest 0x00000001000c83b4 -[XCTestDriver _checkForTestManager] + 296\n\t35 XCTest 0x0000000100114164 _XCTestMain + 628\n\t36 CoreFoundation 0x000000018386cf84 + 20\n\t37 CoreFoundation 0x000000018386c8bc + 308\n\t38 CoreFoundation 0x000000018386a820 + 708\n\t39 CoreFoundation 0x0000000183794c50 CFRunLoopRunSpecific + 384\n\t40 GraphicsServices 0x000000018507c088 GSEventRunModal + 180\n\t41 UIKit 0x0000000188a82088 UIApplicationMain + 204\n\t42 XCTRunner 0x000000010009c3d4 XCTRunner + 33748\n\t43 libdyld.dylib 0x00000001833328b8 + 4\n)",
    "sessionId" : "E58B89D4-3FBF-41EB-9272-A8CC825EA851",
    "status" : 13
    }

  • @gloria0610 换写法?我现在是这样的
    from appium import webdriver
    import os
    from time import sleep

    success = True
    desired_caps = {}
    desired_caps['automationName'] = 'XCUITest'
    desired_caps['appiumversion'] = '1.6.3'
    desired_caps['platformName'] = 'iOS'
    desired_caps['platformVersion'] = '10.1.1'
    desired_caps['deviceName'] = 'iPhone 6'
    desired_caps['app'] = os.path.abspath('app路径')

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

    sleep(1000)
    就是说要将wd这边改掉?

  • @gloria0610 我这边一直在终端里跑appium,应用跑起来后,我想在inspector里抓取元素,但是inspector一致打不开,我这边不知道怎么抓元素了。。。。WDA的http://localhost:8100/inspectorstatus显示的是32,现在一点头绪都没有,在看WDA的官方文件。还有其他方式去查看ios的元素吗?你的遍历是在脚本里输出是吗?显示是各种乱码,返回

  • 不是,1.6.3没有客户端,所以都是在终端里命令行里搞的

  • 求贴一张,成功运行的inspector截图