Open ghost opened 4 years ago
Can you print the error please?
That's Xcode output:
Exception Name: TimeoutException
Exception Reason: Timed out while waiting to perform action.
Exception with Action: {
"Action Name": "Tap",
"Element Matcher": "((kindOfClass('UILabel') || kindOfClass('UITextField') || kindOfClass('UITextView')) && hasText('MEIN PROFIL'))"
}
Exception Details: Error Trace: [
{
"Description": "Failed to execute block because idling resources below are busy.",
"Description Glossary": {
"GREYAppStateTracker": "Waiting for viewDidAppear: call on the view controller. Please ensure that this view controller and its subclasses call through to their super's implementation.
Full state transition call stack for all objects:
<UIEditingOverlayViewController:0x7ff2e842c650> => Waiting for viewDidAppear: call on the view controller. Please ensure that this view controller and its subclasses call through to their super's implementation.
(
0 EarlGrey 0x000000010b5b018e -[GREYAppStateTrackerObject setState:] + 62
1 EarlGrey 0x000000010b557699 __133-[GREYAppStateTracker grey_changeState:usingOperation:forObject:orInternalObjectDeallocationTracker:orExternalAppStateTrackerObject:]_block_invoke + 1161
2 EarlGrey 0x000000010b55684d -[GREYAppStateTracker grey_performBlockInCriticalSection:] + 333
3 EarlGrey 0x000000010b5570be -[GREYAppStateTracker grey_changeState:usingOperation:forObject:orInternalObjectDeallocationTracker:orExternalAppStateTrackerObject:] + 1390
4 EarlGrey 0x000000010b55516f -[GREYAppStateTracker trackState:forObject:] + 95
5 EarlGrey 0x000000010b55bb1f -[UIViewController(GREYAdditions) greyswizzled_viewWillAppear:] + 719
6 UIKitCore 0x00007fff46b03591 -[UIViewController _setViewAppearState:isAnimating:] + 661
7 UIKitCore 0x00007fff46b03cad -[UIViewController __viewWillAppear:] + 115
8 UIKitCore 0x00007fff46b04d82 -[UIViewController viewWillMoveToWindow:] + 654
9 EarlGrey 0x000000010b55b608 -[UIViewController(GREYAdditions) greyswizzled_viewWillMoveToWindow:] + 344
10 UIKitCore 0x00007fff4761f290 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 639
11 UIKitCore 0x00007fff4762f647 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 440
12 EarlGrey 0x000000010b58f90a -[UIView(GREYAdditions) greyswizzled_addSubview:] + 90
13 UIKitCore 0x00007fff46f40bf7 -[UIInputWindowController presentViewController:] + 295
14 UIKitCore 0x00007fff4743980e -[UITextEffectsWindow _commonInitWithOptions:] + 541
15 UIKitCore 0x00007fff474393f3 -[UITextEffectsWindow(UIObjectsForPerCanvas) _initWithCanvas:options:] + 316
16 UIKitCore 0x00007fff474ef615 +[_UIObjectPerCanvas objectOfClass:forCanvas:withOptions:createIfNecessary:] + 1057
17 UIKitCore 0x00007fff4743b2e4 +[UITextEffectsWindow _sharedTextEffectsWindowforWindowScene:allowHosted:matchesStatusBarOrientationOnAccess:shouldCreateIfNecessary:] + 1446
18 UIKitCore 0x00007fff4743b42d +[UITextEffectsWindow sharedTextEffectsWindowForWindowScene:] + 152
19 UIKitCore 0x00007fff46c3b659 -[UIInputResponderController containerWindow] + 152
20 UIKitCore 0x00007fff46c3b777 -[UIInputResponderController containerRootController] + 24
21 UIKitCore 0x00007fff46fc77a7 __43-[_UIRemoteKeyboards reloadForSnapshotting]_block_invoke + 32
22 UIKitCore 0x00007fff46c3b4f9 +[UIInputResponderController performOnControllers:] + 574
23 UIKitCore 0x00007fff46fc810f __33-[_UIRemoteKeyboards willResume:]_block_invoke + 95
24 libdispatch.dylib 0x00007fff511fc7f9 _dispatch_client_callout + 8
25 libdispatch.dylib 0x00007fff511ff211 _dispatch_block_invoke_direct + 285
26 FrontBoardServices 0x00007fff3633108a __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
27 FrontBoardServices 0x00007fff36330d78 -[FBSSerialQueue _queue_performNextIfPossible] + 441
28 FrontBoardServices 0x00007fff36331287 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
29 CoreFoundation 0x00007fff23afbac1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
30 CoreFoundation 0x00007fff23afb9ec __CFRunLoopDoSource0 + 76
31 CoreFoundation 0x00007fff23afb1c4 __CFRunLoopDoSources0 + 180
32 CoreFoundation 0x00007fff23af5ecf __CFRunLoopRun + 1263
33 CoreFoundation 0x00007fff23af56b6 CFRunLoopRunSpecific + 438
34 EarlGrey 0x000000010b5953d6 -[GREYRunLoopSpinner grey_drainRunLoopInActiveModeForDrains:] + 326
35 EarlGrey 0x000000010b595112 -[GREYRunLoopSpinner spinWithStopConditionBlock:] + 402
36 EarlGrey 0x000000010b5e4e27 -[GREYUIThreadExecutor executeSyncWithTimeout:block:error:] + 1415
37 EarlGrey 0x000000010b5b30d2 -[GREYElementInteraction performAction:error:] + 2290
38 EarlGrey 0x000000010b5b278e -[GREYElementInteraction performAction:] + 62
39 ClunoFunctionalTests 0x000000010dc28629 $sSo15GREYInteractionP20ClunoFunctionalTestsE7performyxSo10GREYAction_pSgF + 265
40 ClunoFunctionalTests 0x000000010dc0fb1f $s20ClunoFunctionalTestsAAC3tab2atySi_tFZ + 415
41 ClunoFunctionalTests 0x000000010dc21e52 $s20ClunoFunctionalTestsAAC23provideLoginCredentialsyyF + 82
42 ClunoFunctionalTests 0x000000010dc2281b $s20ClunoFunctionalTestsAAC23provideLoginCredentialsyyFTo + 43
43 ClunoFunctionalTests 0x000000010dc0e4fb $s20ClunoFunctionalTestsAAC17testAlterPasswordyyF + 59
44 ClunoFunctionalTests 0x000000010dc0fb8b $s20ClunoFunctionalTestsAAC17testAlterPasswordyyFTo + 43
45 CoreFoundation 0x00007fff23b9f95c __invoking___ + 140
46 CoreFoundation 0x00007fff23b9cd8f -[NSInvocation invoke] + 287
47 EarlGrey 0x000000010b5aa640 -[GREYTestCaseInvocation invoke] + 112
48 XCTest 0x000000010d8d5121 __24-[XCTestCase invokeTest]_block_invoke.208 + 78
49 XCTest 0x000000010d92f1e2 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57
50 XCTest 0x000000010d92f100 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96
51 XCTest 0x000000010d8d4c0a __24-[XCTestCase invokeTest]_block_invoke + 1153
52 XCTest 0x000000010d8d46e2 -[XCTestCase testContextPerformInScope:] + 211
53 XCTest 0x000000010d8d477c -[XCTestCase invokeTest] + 137
54 EarlGrey 0x000000010b59d2a8 -[XCTestCase(GREYAdditions) grey_invokeTest] + 1576
55 XCTest 0x000000010d8d64ed __26-[XCTestCase performTest:]_block_invoke_2 + 43
56 XCTest 0x000000010d92f1e2 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57
57 XCTest 0x000000010d92f100 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96
58 XCTest 0x000000010d8d6404 __26-[XCTestCase performTest:]_block_invoke.334 + 88
59 XCTest 0x000000010d942492 +[XCTContext runInContextForTestCase:block:] + 219
60 XCTest 0x000000010d8d5b73 -[XCTestCase performTest:] + 668
61 XCTest 0x000000010d91b077 -[XCTest runTest] + 57
62 XCTest 0x000000010d8d014a __27-[XCTestSuite performTest:]_block_invoke + 365
63 XCTest 0x000000010d8cf874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54
64 XCTest 0x000000010d8cfb71 -[XCTestSuite performTest:] + 355
65 XCTest 0x000000010d91b077 -[XCTest runTest] + 57
66 XCTest 0x000000010d8d014a __27-[XCTestSuite performTest:]_block_invoke + 365
67 XCTest 0x000000010d8cf874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54
68 XCTest 0x000000010d8cfb71 -[XCTestSuite performTest:] + 355
69 XCTest 0x000000010d91b077 -[XCTest runTest] + 57
70 XCTest 0x000000010d8d014a __27-[XCTestSuite performTest:]_block_invoke + 365
71 XCTest 0x000000010d8cf874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54
72 XCTest 0x000000010d8cfb71 -[XCTestSuite performTest:] + 355
73 XCTest 0x000000010d91b077 -[XCTest runTest] + 57
74 XCTest 0x000000010d95143e __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 171
75 XCTest 0x000000010d951541 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.84 + 118
76 XCTest 0x000000010d8e9e83 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 588
77 XCTest 0x000000010d9511fd -[XCTTestRunSession runTestsAndReturnError:] + 623
78 XCTest 0x000000010d8b36d7 -[XCTestDriver runTestsAndReturnError:] + 456
79 XCTest 0x000000010d93e6e4 _XCTestMain + 2484
80 libXCTestBundleInject.dylib 0x000000010b6bebe7 __copy_helper_block_e8_32s + 0
81 CoreFoundation 0x00007fff23afb8ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
82 CoreFoundation 0x00007fff23afb058 __CFRunLoopDoBlocks + 312
83 CoreFoundation 0x00007fff23af5ee4 __CFRunLoopRun + 1284
84 CoreFoundation 0x00007fff23af56b6 CFRunLoopRunSpecific + 438
85 GraphicsServices 0x00007fff3815cbb0 GSEventRunModal + 65
86 UIKitCore 0x00007fff47162a67 UIApplicationMain + 1621
87 Cluno 0x000000010a1ad20b main + 75
88 libdyld.dylib 0x00007fff5123bcf5 start + 1
)
"
},
"Error Domain": "com.google.earlgrey.GREYUIThreadExecutorErrorDomain",
"Error Code": "0",
"File Name": "GREYUIThreadExecutor.m",
"Function Name": "-[GREYUIThreadExecutor executeSyncWithTimeout:block:error:]",
"Line": "239",
"TestCase Class": "ClunoFunctionalTests.ClunoFunctionalTests",
"TestCase Method": "testAlterPassword"
},
{
"Description": "Failed to perform action within 30 seconds.",
"Error Domain": "com.google.earlgrey.ElementInteractionErrorDomain",
"Error Code": "4",
"File Name": "GREYElementInteraction.m",
"Function Name": "-[GREYElementInteraction performAction:error:]",
"Line": "303",
"TestCase Class": "ClunoFunctionalTests.ClunoFunctionalTests",
"TestCase Method": "testAlterPassword"
}
]
There are 2 windows being rendered:
UI hierarchy (ordered by window level, front to back as rendered):
Legend: {
"[AX]": "Accessibility",
"[UIE]": "User Interaction Enabled",
"[Window 1]": "Frontmost Window"
}
========== Window 1 ==========
<UITextEffectsWindow:0x7ff2e8550a60; AX=N; AX.frame={{0, 0}, {414, 896}}; AX.activationPoint={207, 448}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {414, 896}}; alpha=1>
|--<UIInputSetContainerView:0x7ff2e841f850; AX=N; AX.frame={{0, 0}, {414, 896}}; AX.activationPoint={207, 448}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {414, 896}}; opaque; alpha=1>
| |--<UIEditingOverlayGestureView:0x7ff2e842cbc0; AX=N; AX.frame={{0, 0}, {414, 896}}; AX.activationPoint={207, 448}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {414, 896}}; opaque; alpha=1>
| |--<UIInputSetHostView:0x7ff2e8413ae0; AX=N; AX.frame={{0, 896}, {414, 0}}; AX.activationPoint={207, 896}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 896}, {414, 0}}; opaque; alpha=1>
========== Window 2 ==========
<Cluno.Window:0x7ff2e85150e0; AX=N; AX.frame={{0, 0}, {414, 896}}; AX.activationPoint={207, 448}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {414, 896}}; opaque; alpha=1>
|--<UITransitionView:0x7ff2e8624550; AX=N; AX.frame={{0, 0}, {414, 896}}; AX.activationPoint={207, 448}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {414, 896}}; opaque; alpha=1>
| |--<UIDropShadowView:0x7ff2e872f900; AX=N; AX.frame={{0, 0}, {414, 896}}; AX.activationPoint={207, 448}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {414, 896}}; opaque; alpha=1>
| | |--<UILayoutContainerView:0x7ff2eae01ed0; AX=N; AX.frame={{0, 0}, {414, 896}}; AX.activationPoint={207, 448}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {414, 896}}; opaque; alpha=1>
| | | |--<UITabBar:0x7ff2e8411990; AX=N; AX.frame={{0, 813}, {414, 83}}; AX.activationPoint={207, 854.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 813}, {414, 83}}; opaque; alpha=1>
...
Window 2 is where I have all my views (and the tabBar I want to access).
We don't have any specific tests for UITabBar
. I can add one and check with EarlGrey 2.0.
@tirodkar i am seeing the same issue on iOS 13.1 for a button click :(
func testBasicSelection() {
EarlGrey.selectElement(with: grey_text("Login")).perform(grey_tap())
}
Exception: ``` Exception: TimeoutException
Exception Name: TimeoutException Exception Reason: Timed out while waiting to perform action. Exception with Action: { "Action Name": "Tap", "Element Matcher": "((kindOfClass('UILabel') || kindOfClass('UITextField') || kindOfClass('UITextView')) && hasText('E2E Login'))" }
Exception Details: Error Trace: [ { "Description": "Failed to execute block because idling resources below are busy.", "Description Glossary": { "GREYAppStateTracker": "Waiting for viewDidAppear: call on the view controller. Please ensure that this view controller and its subclasses call through to their super's implementation.
Full state transition call stack for all objects:
"GREYAppStateTracker": "Waiting for viewDidAppear: call on the view controller. Please ensure that this view controller and its subclasses call through to their super's implementation.
Full state transition call stack for all objects:
UIEditingOverlayViewController:0x7fb4efe305b0 => Waiting for viewDidAppear: call on the view controller. Please ensure that this view controller and its subclasses call through to their super's implementation.
This is an EG synchronization issue with the button's viewDidAppear: not being called. Can you provide us a repro case with our FunctionalTests App?
@tirodkar It's happening on the Demo app as well func testBasicSelectionAndAction() {
just tried now , Using ` pod 'EarlGrey' , 1.15.1
EG 1 isn't supported anymore for bugs in iOS 13. We're just working on a fix for build issues. Is the issue present in EG 2?
@tirodkar how to point to EG2 which version of the pod i need to use it ?
https://github.com/google/EarlGrey/blob/earlgrey2/docs/cocoapods-setup.md Tell me if something is missing. It uses XCUITest instead of XCTest.
@tirodkar seeing below error
[!] CocoaPods could not find compatible versions for pod "EarlGreyTest":
In Podfile:
EarlGreyTest (= 2.0.0-rc)
Specs satisfying the `EarlGreyTest (= 2.0.0-rc)` dependency were found, but they required a higher minimum deployment target.
Hi, I have similar issue. My UI tests are failing on iOS 13 but running just fine on all the previous iOS versions. Issue is that element matcher can not find couple elements/buttons icons in the UI hierarchy, but only iOS 13. Any idea for workaround?
Exception Reason: { "User Info" : { "NSLocalizedDescription" : "Interaction cannot continue because the desired element was not found." }, "Error Info" : { "Search API Info" : "", "Recovery Suggestion" : "Check if the element exists in the UI hierarchy printed below. If it exists, adjust the matcher so that it accurately matches element.", "Assertion Criteria" : "assertWithMatcher:sufficientlyVisible(Expected: 0.750000, Actual: 0.000000)", "Element Matcher" : "(respondsToSelector(accessibilityIdentifier) && accessibilityID('icn_menu_dark'))" },
when I upgraded to EarlGrey 2.0.
App is crashing saying failed at Failed to add forwardInvocation:.
can anyone please help me here.
I'm encountering the same problem when running my XCUITest
s on any device on Firebase Test Lab. eDistantObject prints:
Failed to add forwardInvocation
and then calls abort()
, and that's about it. Tests don't even start.
Running locally works just fine.
This problem looks to be related with:
The function I used to select a tab in iOS < 13 looks like this:
This stopped working, probably due to the new view hierarchy. Did anyone find a way around it?