facebookarchive / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
4.15k stars 1.36k forks source link

can not get react-native app UI element? #1102

Open NeowuqiLee opened 5 years ago

NeowuqiLee commented 5 years ago

xcode (10.1) console log: {152.5, 89.0}}, label: 'xxx' Inconsistent relationships: Other, {{187.5, 576.5}, {152.5, 89.0}}, label: 'xxx' claims parent but is not included in that element's children array. /Users/test/Documents/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 37 1 t = 52.16s Snapshot accessibility hierarchy for app with pid 41476 2019-04-15 15:50:00.641861+0800 WebDriverAgentRunner-Runner[41620:9401339] -[__NSCFString dataSource]: unrecognized selector sent to instance 0x600001610340

http://localhost:8100/source { "value" : "-[__NSCFString dataSource]: unrecognized selector sent to instance 0x600001610340\n\n(\n\t0 CoreFoundation 0x000000010af491bb __exceptionPreprocess + 331\n\t1 libobjc.A.dylib 0x000000010a4e7735 objc_exception_throw + 48\n\t2 CoreFoundation 0x000000010af67f44 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132\n\t3 CoreFoundation 0x000000010af4ded6 ___forwarding___ + 1446\n\t4 CoreFoundation 0x000000010af4fda8 _CF_forwarding_prep_0 + 120\n\t5 XCTAutomationSupport 0x000000011dcd3bcb -[XCElementSnapshot dataSource] + 91\n\t6 XCTAutomationSupport 0x000000011dcd3f52 -[XCElementSnapshot _shouldAttemptFaultForBit:] + 33\n\t7 XCTAutomationSupport 0x000000011dcd504f -[XCElementSnapshot elementType] + 41\n\t8 XCTAutomationSupport 0x000000011dcd355a __34-[XCElementSnapshot copyWithZone:]_block_invoke + 68\n\t9 XCTAutomationSupport 0x000000011dcd49dd -[XCElementSnapshot _assertForFaultsInContext:] + 29\n\t10 XCTAutomationSupport 0x000000011dcd340f -[XCElementSnapshot copyWithZone:] + 326\n\t11 XCTAutomationSupport 0x000000011dcda2f9 -[XCElementSnapshot pathFromRoot] + 56\n\t12 XCTest 0x0000000109d9bdbb -[XCElementSnapshot(Hitpoint) hitTest:] + 752\n\t13 WebDriverAgentLib 0x000000012cf4f530 -[XCElementSnapshot(FBIsVisible) fb_isVisible] + 848\n\t14 WebDriverAgentLib 0x000000012cf5d0dc -[XCElementSnapshot(WebDriverAttributes) isWDVisible] + 44\n\t15 WebDriverAgentLib 0x000000012cf4546f +[FBVisibleAttribute valueForElement:] + 63\n\t16 WebDriverAgentLib 0x000000012cf44ca3 +[FBElementAttribute recordWithWriter:forElement:] + 67\n\t17 WebDriverAgentLib 0x000000012cf44201 +[FBXPath recordElementAttributes:forElement:indexPath:includedAttributes:] + 529\n\t18 WebDriverAgentLib 0x000000012cf446fd +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 845\n\t19 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t20 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t21 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t22 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t23 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t24 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t25 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t26 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t27 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t28 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t29 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t30 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t31 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t32 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t33 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t34 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t35 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t36 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t37 WebDriverAgentLib 0x000000012cf448a3 +[FBXPath generateXMLPresentation:indexPath:elementStore:includedAttributes:writer:] + 1267\n\t38 WebDriverAgentLib 0x000000012cf43a9e +[FBXPath getSnapshotAsXML:writer:elementStore:query:] + 446\n\t39 WebDriverAgentLib 0x000000012cf42e10 +[FBXPath xmlStringWithSnapshot:] + 112\n\t40 WebDriverAgentLib 0x000000012cf5ef0d +[FBDebugCommands handleGetSourceCommand:] + 685\n\t41 WebDriverAgentLib 0x000000012cf51bc6 -[FBRoute_TargetAction mountRequest:intoResponse:] + 182\n\t42 WebDriverAgentLib 0x000000012cf46f29 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 553\n\t43 RoutingHTTPServer 0x000000012d006c18 -[RoutingHTTPServer handleRoute:withRequest:response:] + 136\n\t44 RoutingHTTPServer 0x000000012d0074fa __72-[RoutingHTTPServer routeMethod:withPath:parameters:request:connection:]_block_invoke + 47\n\t45 libdispatch.dylib 0x000000010f9d354b _dispatch_client_callout + 8\n\t46 libdispatch.dylib 0x000000010f9e0036 _dispatch_async_and_wait_invoke + 109\n\t47 libdispatch.dylib 0x000000010f9d354b _dispatch_client_callout + 8\n\t48 libdispatch.dylib 0x000000010f9df380 _dispatch_main_queue_callback_4CF + 1290\n\t49 CoreFoundation 0x000000010aeae3e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\n\t50 CoreFoundation 0x000000010aea8a76 __CFRunLoopRun + 2342\n\t51 CoreFoundation 0x000000010aea7e11 CFRunLoopRunSpecific + 625\n\t52 Foundation 0x0000000109f6b322 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277\n\t53 WebDriverAgentLib 0x000000012cf45d5c -[FBWebServer startServing] + 348\n\t54 WebDriverAgentRunner 0x000000012810903a -[UITestingUITests testRunner] + 122\n\t55 CoreFoundation 0x000000010af5003c __invoking___ + 140\n\t56 CoreFoundation 0x000000010af4d4d5 -[NSInvocation invoke] + 325\n\t57 XCTest 0x0000000109d4d018 __24-[XCTestCase invokeTest]_block_invoke.196 + 78\n\t58 XCTest 0x0000000109da4c74 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57\n\t59 XCTest 0x0000000109da4b91 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96\n\t60 XCTest 0x0000000109d4ccd9 __24-[XCTestCase invokeTest]_block_invoke + 848\n\t61 XCTest 0x0000000109daab7e -[XCUITestContext performInScope:] + 248\n\t62 XCTest 0x0000000109d4c8ce -[XCTestCase testContextPerformInScope:] + 98\n\t63 XCTest 0x0000000109d4c97c -[XCTestCase invokeTest] + 137\n\t64 XCTest 0x0000000109d4e4b7 __26-[XCTestCase performTest:]_block_invoke_2 + 43\n\t65 XCTest 0x0000000109da4c74 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57\n\t66 XCTest 0x0000000109da4b91 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96\n\t67 XCTest 0x0000000109d4e3ce __26-[XCTestCase performTest:]_block_invoke.330 + 88\n\t68 XCTest 0x0000000109db544b +[XCTContext runInContextForTestCase:block:] + 225\n\t69 XCTest 0x0000000109d4dafd -[XCTestCase performTest:] + 675\n\t70 XCTest 0x0000000109d911a2 -[XCTest runTest] + 57\n\t71 XCTest 0x0000000109d48ccb __27-[XCTestSuite performTest:]_block_invoke + 365\n\t72 XCTest 0x0000000109d484a3 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 55\n\t73 XCTest 0x0000000109d48766 -[XCTestSuite performTest:] + 296\n\t74 XCTest 0x0000000109d911a2 -[XCTest runTest] + 57\n\t75 XCTest 0x0000000109d48ccb __27-[XCTestSuite performTest:]_block_invoke + 365\n\t76 XCTest 0x0000000109d484a3 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 55\n\t77 XCTest 0x0000000109d48766 -[XCTestSuite performTest:] + 296\n\t78 XCTest 0x0000000109d911a2 -[XCTest runTest] + 57\n\t79 XCTest 0x0000000109d48ccb __27-[XCTestSuite performTest:]_block_invoke + 365\n\t80 XCTest 0x0000000109d484a3 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 55\n\t81 XCTest 0x0000000109d48766 -[XCTestSuite performTest:] + 296\n\t82 XCTest 0x0000000109d911a2 -[XCTest runTest] + 57\n\t83 XCTest 0x0000000109dc0e86 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 171\n\t84 XCTest 0x0000000109dc0fa7 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.80 + 68\n\t85 XCTest 0x0000000109d60bc1 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 585\n\t86 XCTest 0x0000000109dc0bfa -[XCTTestRunSession runTestsAndReturnError:] + 623\n\t87 XCTest 0x0000000109d2d6b6 -[XCTestDriver runTestsAndReturnError:] + 422\n\t88 XCTest 0x0000000109db19cd _XCTestMain + 1478\n\t89 WebDriverAgentRunner-Runner 0x0000000109a4c02d -[_XCTRunnerAppDelegate applicationWillResignActive:] + 0\n\t90 WebDriverAgentRunner-Runner 0x0000000109a4bf2b _XCTRunnerRunTests + 0\n\t91 CoreFoundation 0x000000010aeae62c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12\n\t92 CoreFoundation 0x000000010aeadde0 __CFRunLoopDoBlocks + 336\n\t93 CoreFoundation 0x000000010aea8654 __CFRunLoopRun + 1284\n\t94 CoreFoundation 0x000000010aea7e11 CFRunLoopRunSpecific + 625\n\t95 GraphicsServices 0x00000001135371dd GSEventRunModal + 62\n\t96 UIKitCore 0x000000010bedc81d UIApplicationMain + 140\n\t97 WebDriverAgentRunner-Runner 0x0000000109a4c1f5 main + 183\n\t98 libdyld.dylib 0x000000010fa43575 start + 1\n\t99 ??? 0x0000000000000005 0x0 + 5\n)", "sessionId" : "9570C0BD-46FC-4D30-9CEE-5EFE75CEB270", "status" : 13 }

lobix commented 5 years ago

I am also having this problem. Does anyone have any idea?