appium-webdriveragent 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PrivateHeaders/XCTest/XCAXClient_iOS.h +0 -7
- package/PrivateHeaders/XCTest/XCAccessibilityElement.h +2 -0
- package/PrivateHeaders/XCTest/XCElementSnapshot.h +0 -7
- package/PrivateHeaders/XCTest/XCPointerEventPath.h +0 -2
- package/PrivateHeaders/XCTest/XCTestCaseRun.h +0 -2
- package/PrivateHeaders/XCTest/XCTestDriver.h +0 -6
- package/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h +0 -2
- package/PrivateHeaders/XCTest/XCUIApplication.h +0 -3
- package/PrivateHeaders/XCTest/XCUIDevice.h +0 -2
- package/PrivateHeaders/XCTest/XCUIElement.h +0 -5
- package/PrivateHeaders/XCTest/XCUIElementQuery.h +0 -2
- package/WebDriverAgent.xcodeproj/project.pbxproj +10 -33
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazuaki.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazuaki.xcuserdatad/WorkspaceSettings.xcsettings +20 -0
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationApp.xcscheme +3 -7
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_1.xcscheme +1 -1
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_2.xcscheme +1 -1
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationTests_3.xcscheme +1 -1
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentLib.xcscheme +10 -14
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentLib_tvOS.xcscheme +10 -14
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner-nodebug.xcscheme +3 -7
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner.xcscheme +1 -1
- package/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner_tvOS.xcscheme +1 -1
- package/WebDriverAgent.xcodeproj/xcuserdata/kazuaki.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +3032 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/{elf.xcuserdatad → kazuaki.xcuserdatad}/xcschemes/xcschememanagement.plist +35 -12
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.h +0 -9
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +0 -16
- package/WebDriverAgentLib/Categories/XCUIElement+FBSwiping.h +1 -2
- package/WebDriverAgentLib/Categories/XCUIElement+FBSwiping.m +1 -5
- package/WebDriverAgentLib/Categories/XCUIElement+FBUtilities.m +1 -7
- package/WebDriverAgentLib/Commands/FBCustomCommands.m +1 -5
- package/WebDriverAgentLib/FBApplication.m +1 -12
- package/WebDriverAgentLib/Utilities/FBFailureProofTestCase.m +7 -10
- package/WebDriverAgentLib/Utilities/FBW3CActionsSynthesizer.m +4 -16
- package/WebDriverAgentLib/Utilities/FBXCAXClientProxy.h +0 -2
- package/WebDriverAgentLib/Utilities/FBXCAXClientProxy.m +15 -37
- package/WebDriverAgentLib/Utilities/FBXCTestDaemonsProxy.m +4 -15
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.h +0 -17
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.m +1 -55
- package/WebDriverAgentRunner-Runner.app.zip +0 -0
- package/build/index.js +2 -4
- package/build/lib/constants.js +2 -4
- package/index.js +2 -2
- package/lib/constants.js +1 -2
- package/package.json +3 -3
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/elf.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/elf.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -91
|
@@ -4,55 +4,78 @@
|
|
|
4
4
|
<dict>
|
|
5
5
|
<key>SchemeUserState</key>
|
|
6
6
|
<dict>
|
|
7
|
+
<key>IntegrationApp.xcscheme</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>3</integer>
|
|
11
|
+
</dict>
|
|
7
12
|
<key>IntegrationApp.xcscheme_^#shared#^_</key>
|
|
8
13
|
<dict>
|
|
9
14
|
<key>orderHint</key>
|
|
10
|
-
<integer>
|
|
15
|
+
<integer>5</integer>
|
|
11
16
|
</dict>
|
|
12
17
|
<key>IntegrationTests_1.xcscheme_^#shared#^_</key>
|
|
13
18
|
<dict>
|
|
14
19
|
<key>orderHint</key>
|
|
15
|
-
<integer>
|
|
20
|
+
<integer>6</integer>
|
|
16
21
|
</dict>
|
|
17
22
|
<key>IntegrationTests_2.xcscheme_^#shared#^_</key>
|
|
18
23
|
<dict>
|
|
19
24
|
<key>orderHint</key>
|
|
20
|
-
<integer>
|
|
25
|
+
<integer>7</integer>
|
|
21
26
|
</dict>
|
|
22
27
|
<key>IntegrationTests_3.xcscheme_^#shared#^_</key>
|
|
23
28
|
<dict>
|
|
24
29
|
<key>orderHint</key>
|
|
25
|
-
<integer>
|
|
30
|
+
<integer>8</integer>
|
|
26
31
|
</dict>
|
|
27
|
-
<key>WebDriverAgentLib
|
|
32
|
+
<key>WebDriverAgentLib.xcscheme_^#shared#^_</key>
|
|
28
33
|
<dict>
|
|
29
34
|
<key>orderHint</key>
|
|
30
|
-
<integer>
|
|
35
|
+
<integer>0</integer>
|
|
31
36
|
</dict>
|
|
32
|
-
<key>
|
|
37
|
+
<key>WebDriverAgentLib_tvOS copy.xcscheme_^#shared#^_</key>
|
|
33
38
|
<dict>
|
|
34
39
|
<key>orderHint</key>
|
|
35
|
-
<integer>
|
|
40
|
+
<integer>10</integer>
|
|
36
41
|
</dict>
|
|
37
42
|
<key>WebDriverAgentLib_tvOS.xcscheme_^#shared#^_</key>
|
|
38
43
|
<dict>
|
|
39
44
|
<key>orderHint</key>
|
|
40
|
-
<integer>
|
|
45
|
+
<integer>3</integer>
|
|
46
|
+
</dict>
|
|
47
|
+
<key>WebDriverAgentLib_watchOS.xcscheme_^#shared#^_</key>
|
|
48
|
+
<dict>
|
|
49
|
+
<key>orderHint</key>
|
|
50
|
+
<integer>10</integer>
|
|
41
51
|
</dict>
|
|
42
52
|
<key>WebDriverAgentRunner-nodebug.xcscheme_^#shared#^_</key>
|
|
43
53
|
<dict>
|
|
44
54
|
<key>orderHint</key>
|
|
45
|
-
<integer>
|
|
55
|
+
<integer>2</integer>
|
|
46
56
|
</dict>
|
|
47
57
|
<key>WebDriverAgentRunner.xcscheme_^#shared#^_</key>
|
|
48
58
|
<dict>
|
|
49
59
|
<key>orderHint</key>
|
|
50
|
-
<integer>
|
|
60
|
+
<integer>1</integer>
|
|
51
61
|
</dict>
|
|
52
62
|
<key>WebDriverAgentRunner_tvOS.xcscheme_^#shared#^_</key>
|
|
53
63
|
<dict>
|
|
54
64
|
<key>orderHint</key>
|
|
55
|
-
<integer>
|
|
65
|
+
<integer>4</integer>
|
|
66
|
+
</dict>
|
|
67
|
+
<key>WebDriverAgentRunner_watchOS.xcscheme_^#shared#^_</key>
|
|
68
|
+
<dict>
|
|
69
|
+
<key>orderHint</key>
|
|
70
|
+
<integer>9</integer>
|
|
71
|
+
</dict>
|
|
72
|
+
</dict>
|
|
73
|
+
<key>SuppressBuildableAutocreation</key>
|
|
74
|
+
<dict>
|
|
75
|
+
<key>72F9A2AB26B5121A00A27636</key>
|
|
76
|
+
<dict>
|
|
77
|
+
<key>primary</key>
|
|
78
|
+
<true/>
|
|
56
79
|
</dict>
|
|
57
80
|
</dict>
|
|
58
81
|
</dict>
|
|
@@ -26,15 +26,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
26
26
|
*/
|
|
27
27
|
- (BOOL)fb_deactivateWithDuration:(NSTimeInterval)duration error:(NSError **)error;
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
Resets the authorization status for a protected resource. Available since Xcode 11.4
|
|
31
|
-
|
|
32
|
-
@param resourceId A valid resource id to reset the auth status for. See https://developer.apple.com/documentation/xctest/xcuiprotectedresource?language=objc
|
|
33
|
-
@param error If there is an error, upon return contains an NSError object that describes the problem.
|
|
34
|
-
@return YES if the operation succeeds, otherwise NO.
|
|
35
|
-
*/
|
|
36
|
-
- (BOOL)fb_resetAuthorizationStatusForResource:(long long)resourceId error:(NSError **)error;
|
|
37
|
-
|
|
38
29
|
/**
|
|
39
30
|
Return application elements tree in form of nested dictionaries
|
|
40
31
|
*/
|
|
@@ -217,22 +217,6 @@ static NSString* const FBUnknownBundleId = @"unknown";
|
|
|
217
217
|
}
|
|
218
218
|
#endif
|
|
219
219
|
|
|
220
|
-
- (BOOL)fb_resetAuthorizationStatusForResource:(long long)resourceId error:(NSError **)error
|
|
221
|
-
{
|
|
222
|
-
SEL selector = NSSelectorFromString(@"resetAuthorizationStatusForResource:");
|
|
223
|
-
if (![self respondsToSelector:selector]) {
|
|
224
|
-
return [[[FBErrorBuilder builder]
|
|
225
|
-
withDescription:@"'resetAuthorizationStatusForResource' API is only supported for Xcode SDK 11.4 and later"]
|
|
226
|
-
buildError:error];
|
|
227
|
-
}
|
|
228
|
-
NSMethodSignature *signature = [self methodSignatureForSelector:selector];
|
|
229
|
-
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
|
|
230
|
-
[invocation setSelector:selector];
|
|
231
|
-
[invocation setArgument:&resourceId atIndex:2]; // 0 and 1 are reserved
|
|
232
|
-
[invocation invokeWithTarget:self];
|
|
233
|
-
return YES;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
220
|
- (BOOL)fb_dismissKeyboardWithKeyNames:(nullable NSArray<NSString *> *)keyNames
|
|
237
221
|
error:(NSError **)error
|
|
238
222
|
{
|
|
@@ -16,8 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
16
16
|
* Performs swipe gesture on the element
|
|
17
17
|
*
|
|
18
18
|
* @param direction Swipe direction. The following values are supported: up, down, left and right
|
|
19
|
-
* @param velocity Swipe speed in pixels per second
|
|
20
|
-
* nil value means that the default velocity is going to be used.
|
|
19
|
+
* @param velocity Swipe speed in pixels per second
|
|
21
20
|
*/
|
|
22
21
|
- (void)fb_swipeWithDirection:(NSString *)direction velocity:(nullable NSNumber*)velocity;
|
|
23
22
|
|
|
@@ -18,11 +18,7 @@
|
|
|
18
18
|
{
|
|
19
19
|
double velocityValue = .0;
|
|
20
20
|
if (nil != velocity) {
|
|
21
|
-
|
|
22
|
-
velocityValue = [velocity doubleValue];
|
|
23
|
-
} else {
|
|
24
|
-
[FBLogger log:@"Custom velocity values are only supported since Xcode SDK 11.4. The default velocity will be used instead"];
|
|
25
|
-
}
|
|
21
|
+
velocityValue = [velocity doubleValue];
|
|
26
22
|
}
|
|
27
23
|
|
|
28
24
|
if (velocityValue > 0) {
|
|
@@ -45,13 +45,7 @@
|
|
|
45
45
|
{
|
|
46
46
|
NSError *error = nil;
|
|
47
47
|
self.fb_isResolvedFromCache = @(NO);
|
|
48
|
-
|
|
49
|
-
self.lastSnapshot = [self.fb_query fb_uniqueSnapshotWithError:&error];
|
|
50
|
-
} else {
|
|
51
|
-
self.lastSnapshot = nil;
|
|
52
|
-
// TODO: Remove this branch after Xcode10 support is dropped
|
|
53
|
-
[self fb_resolveWithError:&error];
|
|
54
|
-
}
|
|
48
|
+
self.lastSnapshot = [self.fb_query fb_uniqueSnapshotWithError:&error];
|
|
55
49
|
if (nil == self.lastSnapshot) {
|
|
56
50
|
NSString *hintText = @"Make sure the application UI has the expected state";
|
|
57
51
|
if (nil != error
|
|
@@ -292,11 +292,7 @@
|
|
|
292
292
|
NSString *errMsg = @"The 'resource' argument must be set to a valid resource identifier (numeric value). See https://developer.apple.com/documentation/xctest/xcuiprotectedresource?language=objc";
|
|
293
293
|
return FBResponseWithStatus([FBCommandStatus invalidArgumentErrorWithMessage:errMsg traceback:nil]);
|
|
294
294
|
}
|
|
295
|
-
|
|
296
|
-
if (![request.session.activeApplication fb_resetAuthorizationStatusForResource:resource.longLongValue
|
|
297
|
-
error:&error]) {
|
|
298
|
-
return FBResponseWithUnknownError(error);
|
|
299
|
-
}
|
|
295
|
+
[request.session.activeApplication resetAuthorizationStatusForResource:(XCUIProtectedResource)resource.longLongValue];
|
|
300
296
|
return FBResponseWithOK();
|
|
301
297
|
}
|
|
302
298
|
|
|
@@ -133,23 +133,12 @@ static const NSTimeInterval APP_STATE_CHANGE_TIMEOUT = 5.0;
|
|
|
133
133
|
[[FBXCAXClientProxy.sharedClient systemApplication] processIdentifier]];
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
+ (instancetype)appWithPID:(pid_t)processID
|
|
137
|
-
{
|
|
138
|
-
if ([NSProcessInfo processInfo].processIdentifier == processID) {
|
|
139
|
-
return nil;
|
|
140
|
-
}
|
|
141
|
-
return [super appWithPID:processID];
|
|
142
|
-
}
|
|
143
|
-
|
|
144
136
|
+ (instancetype)applicationWithPID:(pid_t)processID
|
|
145
137
|
{
|
|
146
138
|
if ([NSProcessInfo processInfo].processIdentifier == processID) {
|
|
147
139
|
return nil;
|
|
148
140
|
}
|
|
149
|
-
|
|
150
|
-
return (FBApplication *)[FBXCAXClientProxy.sharedClient monitoredApplicationWithProcessIdentifier:processID];
|
|
151
|
-
}
|
|
152
|
-
return [super applicationWithPID:processID];
|
|
141
|
+
return (FBApplication *)[FBXCAXClientProxy.sharedClient monitoredApplicationWithProcessIdentifier:processID];
|
|
153
142
|
}
|
|
154
143
|
|
|
155
144
|
- (void)launch
|
|
@@ -23,18 +23,15 @@
|
|
|
23
23
|
{
|
|
24
24
|
[super setUp];
|
|
25
25
|
self.continueAfterFailure = YES;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
(_XCTestCaseImplementation *)[FBXCTestCaseImplementationFailureHoldingProxy
|
|
30
|
-
proxyWithXCTestCaseImplementation:self.internalImplementation];
|
|
31
|
-
} else {
|
|
32
|
-
// https://github.com/appium/appium/issues/13949
|
|
33
|
-
self.shouldSetShouldHaltWhenReceivesControl = NO;
|
|
34
|
-
self.shouldHaltWhenReceivesControl = NO;
|
|
35
|
-
}
|
|
26
|
+
// https://github.com/appium/appium/issues/13949
|
|
27
|
+
self.shouldSetShouldHaltWhenReceivesControl = NO;
|
|
28
|
+
self.shouldHaltWhenReceivesControl = NO;
|
|
36
29
|
}
|
|
37
30
|
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
Override 'recordFailureWithDescription' to not stop by failures.
|
|
34
|
+
*/
|
|
38
35
|
- (void)recordFailureWithDescription:(NSString *)description
|
|
39
36
|
inFile:(NSString *)filePath
|
|
40
37
|
atLine:(NSUInteger)lineNumber
|
|
@@ -519,22 +519,10 @@ static NSString *const FB_KEY_ACTIONS = @"actions";
|
|
|
519
519
|
// TODO: The current approach throws zero division error on execution
|
|
520
520
|
// NSUInteger modifiers = [self collectModifersWithItems:allItems currentItemIndex:currentItemIndex];
|
|
521
521
|
// [resultPath setModifiers:modifiers mergeWithCurrentModifierFlags:NO atOffset:0];
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
} else if ([resultPath respondsToSelector:@selector(typeText:atOffset:typingSpeed:shouldRedact:)]) {
|
|
527
|
-
[resultPath typeText:text
|
|
528
|
-
atOffset:offset
|
|
529
|
-
typingSpeed:FBConfiguration.maxTypingFrequency
|
|
530
|
-
shouldRedact:YES];
|
|
531
|
-
} else {
|
|
532
|
-
NSString *description = @"typeText: selector signature has been unexpectedly changed in the current XCTest SDK. Consider switching to the most recent WDA version";
|
|
533
|
-
if (error) {
|
|
534
|
-
*error = [[FBErrorBuilder.builder withDescription:description] build];
|
|
535
|
-
}
|
|
536
|
-
return nil;
|
|
537
|
-
}
|
|
522
|
+
[resultPath typeText:text
|
|
523
|
+
atOffset:offset
|
|
524
|
+
typingSpeed:FBConfiguration.maxTypingFrequency
|
|
525
|
+
shouldRedact:YES];
|
|
538
526
|
return @[resultPath];
|
|
539
527
|
}
|
|
540
528
|
|
|
@@ -52,11 +52,7 @@ static id FBAXClient = nil;
|
|
|
52
52
|
static dispatch_once_t onceToken;
|
|
53
53
|
dispatch_once(&onceToken, ^{
|
|
54
54
|
instance = [[self alloc] init];
|
|
55
|
-
|
|
56
|
-
FBAXClient = [XCAXClient_iOS sharedClient];
|
|
57
|
-
} else {
|
|
58
|
-
FBAXClient = [XCUIDevice.sharedDevice accessibilityInterface];
|
|
59
|
-
}
|
|
55
|
+
FBAXClient = [XCUIDevice.sharedDevice accessibilityInterface];
|
|
60
56
|
});
|
|
61
57
|
return instance;
|
|
62
58
|
}
|
|
@@ -81,18 +77,13 @@ static id FBAXClient = nil;
|
|
|
81
77
|
[parameters addEntriesFromDictionary:self.defaultParameters];
|
|
82
78
|
parameters[FBSnapshotMaxDepthKey] = maxDepth;
|
|
83
79
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
return [FBAXClient snapshotForElement:element
|
|
93
|
-
attributes:attributes
|
|
94
|
-
parameters:[parameters copy]
|
|
95
|
-
error:error];
|
|
80
|
+
|
|
81
|
+
id result = [FBAXClient requestSnapshotForElement:element
|
|
82
|
+
attributes:attributes
|
|
83
|
+
parameters:[parameters copy]
|
|
84
|
+
error:error];
|
|
85
|
+
XCElementSnapshot *snapshot = [result valueForKey:@"_rootElementSnapshot"];
|
|
86
|
+
return nil == snapshot ? result : snapshot;
|
|
96
87
|
}
|
|
97
88
|
|
|
98
89
|
- (NSArray<XCAccessibilityElement *> *)activeApplications
|
|
@@ -119,27 +110,14 @@ static id FBAXClient = nil;
|
|
|
119
110
|
- (NSDictionary *)attributesForElement:(XCAccessibilityElement *)element
|
|
120
111
|
attributes:(NSArray *)attributes
|
|
121
112
|
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
[FBLogger logFmt:@"Cannot retrieve element attribute(s) %@. Original error: %@", attributes, error.description];
|
|
129
|
-
}
|
|
130
|
-
return result;
|
|
113
|
+
NSError *error = nil;
|
|
114
|
+
NSDictionary* result = [FBAXClient attributesForElement:element
|
|
115
|
+
attributes:attributes
|
|
116
|
+
error:&error];
|
|
117
|
+
if (error) {
|
|
118
|
+
[FBLogger logFmt:@"Cannot retrieve element attribute(s) %@. Original error: %@", attributes, error.description];
|
|
131
119
|
}
|
|
132
|
-
return
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
- (BOOL)hasProcessTracker
|
|
136
|
-
{
|
|
137
|
-
static BOOL hasTracker;
|
|
138
|
-
static dispatch_once_t onceToken;
|
|
139
|
-
dispatch_once(&onceToken, ^{
|
|
140
|
-
hasTracker = [FBAXClient respondsToSelector:@selector(applicationProcessTracker)];
|
|
141
|
-
});
|
|
142
|
-
return hasTracker;
|
|
120
|
+
return result;
|
|
143
121
|
}
|
|
144
122
|
|
|
145
123
|
- (XCUIApplication *)monitoredApplicationWithProcessIdentifier:(int)pid
|
|
@@ -50,12 +50,7 @@ static dispatch_once_t onceTestRunnerDaemonClass;
|
|
|
50
50
|
|
|
51
51
|
+ (id<XCTestManager_ManagerInterface>)retrieveTestRunnerProxy
|
|
52
52
|
{
|
|
53
|
-
|
|
54
|
-
[[XCTestDriver sharedTestDriver] respondsToSelector:@selector(managerProxy)]) {
|
|
55
|
-
return [XCTestDriver sharedTestDriver].managerProxy;
|
|
56
|
-
} else {
|
|
57
|
-
return ((XCTRunnerDaemonSession *)[FBXCTRunnerDaemonSessionClass sharedSession]).daemonProxy;
|
|
58
|
-
}
|
|
53
|
+
return ((XCTRunnerDaemonSession *)[FBXCTRunnerDaemonSessionClass sharedSession]).daemonProxy;
|
|
59
54
|
}
|
|
60
55
|
|
|
61
56
|
#if !TARGET_OS_TV
|
|
@@ -87,15 +82,9 @@ static dispatch_once_t onceTestRunnerDaemonClass;
|
|
|
87
82
|
XCEventGeneratorHandler handlerBlock = ^(XCSynthesizedEventRecord *innerRecord, NSError *invokeError) {
|
|
88
83
|
errorHandler(invokeError);
|
|
89
84
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}];
|
|
94
|
-
} else {
|
|
95
|
-
[[FBXCTRunnerDaemonSessionClass sharedSession] synthesizeEvent:record completion:^(NSError *invokeError){
|
|
96
|
-
handlerBlock(record, invokeError);
|
|
97
|
-
}];
|
|
98
|
-
}
|
|
85
|
+
[[XCUIDevice.sharedDevice eventSynthesizer] synthesizeEvent:record completion:(id)^(BOOL result, NSError *invokeError) {
|
|
86
|
+
handlerBlock(record, invokeError);
|
|
87
|
+
}];
|
|
99
88
|
}
|
|
100
89
|
}];
|
|
101
90
|
return didSucceed;
|
|
@@ -34,8 +34,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
34
34
|
*/
|
|
35
35
|
@interface XCElementSnapshot (FBCompatibility)
|
|
36
36
|
|
|
37
|
-
- (nullable XCElementSnapshot *)fb_rootElement;
|
|
38
|
-
|
|
39
37
|
+ (nullable SEL)fb_attributesForElementSnapshotKeyPathsSelector;
|
|
40
38
|
|
|
41
39
|
@end
|
|
@@ -93,11 +91,6 @@ extern NSString *const FBApplicationMethodNotSupportedException;
|
|
|
93
91
|
*/
|
|
94
92
|
- (nullable XCElementSnapshot *)fb_uniqueSnapshotWithError:(NSError **)error;
|
|
95
93
|
|
|
96
|
-
/**
|
|
97
|
-
@returns YES if the element supports unique snapshots retrieval
|
|
98
|
-
*/
|
|
99
|
-
- (BOOL)fb_isUniqueSnapshotSupported;
|
|
100
|
-
|
|
101
94
|
@end
|
|
102
95
|
|
|
103
96
|
|
|
@@ -110,16 +103,6 @@ extern NSString *const FBApplicationMethodNotSupportedException;
|
|
|
110
103
|
|
|
111
104
|
@interface XCUIElement (FBCompatibility)
|
|
112
105
|
|
|
113
|
-
/**
|
|
114
|
-
Enforces snapshot resolution of the destination element.
|
|
115
|
-
!!! Do not cal this method on Xcode 11 or later due to performance considerations.
|
|
116
|
-
Prefer using fb_takeSnapshot instead.
|
|
117
|
-
|
|
118
|
-
@param error Contains the actual error if element resolution fails
|
|
119
|
-
@returns YES if the element has been successfully resolved
|
|
120
|
-
*/
|
|
121
|
-
- (BOOL)fb_resolveWithError:(NSError **)error;
|
|
122
|
-
|
|
123
106
|
/**
|
|
124
107
|
Determines whether current iOS SDK supports non modal elements inlusion into snapshots
|
|
125
108
|
|
|
@@ -19,21 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
static const NSTimeInterval APP_STATE_CHANGE_TIMEOUT = 5.0;
|
|
21
21
|
|
|
22
|
-
static BOOL FBShouldUseOldElementRootSelector = NO;
|
|
23
|
-
static dispatch_once_t onceRootElementToken;
|
|
24
22
|
@implementation XCElementSnapshot (FBCompatibility)
|
|
25
23
|
|
|
26
|
-
- (XCElementSnapshot *)fb_rootElement
|
|
27
|
-
{
|
|
28
|
-
dispatch_once(&onceRootElementToken, ^{
|
|
29
|
-
FBShouldUseOldElementRootSelector = [self respondsToSelector:@selector(_rootElement)];
|
|
30
|
-
});
|
|
31
|
-
if (FBShouldUseOldElementRootSelector) {
|
|
32
|
-
return [self _rootElement];
|
|
33
|
-
}
|
|
34
|
-
return [self rootElement];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
24
|
+ (id)fb_axAttributesForElementSnapshotKeyPathsIOS:(id)arg1
|
|
38
25
|
{
|
|
39
26
|
return [self.class axAttributesForElementSnapshotKeyPaths:arg1 isMacOS:NO];
|
|
@@ -44,9 +31,7 @@ static dispatch_once_t onceRootElementToken;
|
|
|
44
31
|
static SEL attributesForElementSnapshotKeyPathsSelector = nil;
|
|
45
32
|
static dispatch_once_t attributesForElementSnapshotKeyPathsSelectorToken;
|
|
46
33
|
dispatch_once(&attributesForElementSnapshotKeyPathsSelectorToken, ^{
|
|
47
|
-
if ([self.class respondsToSelector:@selector(
|
|
48
|
-
attributesForElementSnapshotKeyPathsSelector = @selector(snapshotAttributesForElementSnapshotKeyPaths:);
|
|
49
|
-
} else if ([self.class respondsToSelector:@selector(axAttributesForElementSnapshotKeyPaths:)]) {
|
|
34
|
+
if ([self.class respondsToSelector:@selector(axAttributesForElementSnapshotKeyPaths:)]) {
|
|
50
35
|
attributesForElementSnapshotKeyPathsSelector = @selector(axAttributesForElementSnapshotKeyPaths:);
|
|
51
36
|
} else if ([self.class respondsToSelector:@selector(axAttributesForElementSnapshotKeyPaths:isMacOS:)]) {
|
|
52
37
|
attributesForElementSnapshotKeyPathsSelector = @selector(fb_axAttributesForElementSnapshotKeyPathsIOS:);
|
|
@@ -60,22 +45,14 @@ static dispatch_once_t onceRootElementToken;
|
|
|
60
45
|
|
|
61
46
|
NSString *const FBApplicationMethodNotSupportedException = @"FBApplicationMethodNotSupportedException";
|
|
62
47
|
|
|
63
|
-
static BOOL FBShouldUseOldAppWithPIDSelector = NO;
|
|
64
|
-
static dispatch_once_t onceAppWithPIDToken;
|
|
65
48
|
@implementation XCUIApplication (FBCompatibility)
|
|
66
49
|
|
|
67
50
|
+ (instancetype)fb_applicationWithPID:(pid_t)processID
|
|
68
51
|
{
|
|
69
|
-
dispatch_once(&onceAppWithPIDToken, ^{
|
|
70
|
-
FBShouldUseOldAppWithPIDSelector = [XCUIApplication respondsToSelector:@selector(appWithPID:)];
|
|
71
|
-
});
|
|
72
52
|
if (0 == processID) {
|
|
73
53
|
return nil;
|
|
74
54
|
}
|
|
75
55
|
|
|
76
|
-
if (FBShouldUseOldAppWithPIDSelector) {
|
|
77
|
-
return [self appWithPID:processID];
|
|
78
|
-
}
|
|
79
56
|
return [self applicationWithPID:processID];
|
|
80
57
|
}
|
|
81
58
|
|
|
@@ -105,16 +82,6 @@ static dispatch_once_t onceAppWithPIDToken;
|
|
|
105
82
|
|
|
106
83
|
@implementation XCUIElementQuery (FBCompatibility)
|
|
107
84
|
|
|
108
|
-
- (BOOL)fb_isUniqueSnapshotSupported
|
|
109
|
-
{
|
|
110
|
-
static dispatch_once_t onceToken;
|
|
111
|
-
static BOOL isUniqueMatchingSnapshotAvailable;
|
|
112
|
-
dispatch_once(&onceToken, ^{
|
|
113
|
-
isUniqueMatchingSnapshotAvailable = [self respondsToSelector:@selector(uniqueMatchingSnapshotWithError:)];
|
|
114
|
-
});
|
|
115
|
-
return isUniqueMatchingSnapshotAvailable;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
85
|
- (XCElementSnapshot *)fb_uniqueSnapshotWithError:(NSError **)error
|
|
119
86
|
{
|
|
120
87
|
return [self uniqueMatchingSnapshotWithError:error];
|
|
@@ -140,27 +107,6 @@ static dispatch_once_t onceAppWithPIDToken;
|
|
|
140
107
|
|
|
141
108
|
@implementation XCUIElement (FBCompatibility)
|
|
142
109
|
|
|
143
|
-
- (BOOL)fb_resolveWithError:(NSError **)error
|
|
144
|
-
{
|
|
145
|
-
@try {
|
|
146
|
-
// The order here matters
|
|
147
|
-
if ([self respondsToSelector:@selector(resolveOrRaiseTestFailure)]) {
|
|
148
|
-
[self resolveOrRaiseTestFailure];
|
|
149
|
-
return YES;
|
|
150
|
-
} else if ([self respondsToSelector:@selector(resolve:)]) {
|
|
151
|
-
return [self resolve:error];
|
|
152
|
-
} else if ([self respondsToSelector:@selector(resolve)]) {
|
|
153
|
-
[self resolve];
|
|
154
|
-
return nil != self.lastSnapshot;
|
|
155
|
-
}
|
|
156
|
-
} @catch (NSException *e) {
|
|
157
|
-
if (nil != e.reason) {
|
|
158
|
-
return [[FBErrorBuilder.builder withDescription:(NSString *)e.reason] buildError:error];
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return [[FBErrorBuilder.builder withDescription:@"Cannot find a matching method to resolve elements. Please contact Appium developers"] buildError:error];
|
|
162
|
-
}
|
|
163
|
-
|
|
164
110
|
+ (BOOL)fb_supportsNonModalElementsInclusion
|
|
165
111
|
{
|
|
166
112
|
static dispatch_once_t hasIncludingNonModalElements;
|
|
Binary file
|
package/build/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.resetTestProcesses = exports.checkForDependencies = exports.bundleWDASim = exports.WebDriverAgent = exports.WDA_RUNNER_BUNDLE_ID = exports.
|
|
6
|
+
exports.resetTestProcesses = exports.checkForDependencies = exports.bundleWDASim = exports.WebDriverAgent = exports.WDA_RUNNER_BUNDLE_ID = exports.WDA_BASE_URL = exports.PROJECT_FILE = exports.NoSessionProxy = exports.BOOTSTRAP_PATH = void 0;
|
|
7
7
|
|
|
8
8
|
require("source-map-support/register");
|
|
9
9
|
|
|
@@ -38,7 +38,6 @@ const {
|
|
|
38
38
|
} = driver;
|
|
39
39
|
exports.WebDriverAgent = WebDriverAgent;
|
|
40
40
|
const {
|
|
41
|
-
WDA_BUNDLE_ID,
|
|
42
41
|
BOOTSTRAP_PATH,
|
|
43
42
|
WDA_BASE_URL,
|
|
44
43
|
WDA_RUNNER_BUNDLE_ID,
|
|
@@ -48,7 +47,6 @@ exports.PROJECT_FILE = PROJECT_FILE;
|
|
|
48
47
|
exports.WDA_RUNNER_BUNDLE_ID = WDA_RUNNER_BUNDLE_ID;
|
|
49
48
|
exports.WDA_BASE_URL = WDA_BASE_URL;
|
|
50
49
|
exports.BOOTSTRAP_PATH = BOOTSTRAP_PATH;
|
|
51
|
-
exports.WDA_BUNDLE_ID = WDA_BUNDLE_ID;
|
|
52
50
|
const {
|
|
53
51
|
resetTestProcesses
|
|
54
52
|
} = utils;
|
|
@@ -59,4 +57,4 @@ if (require.main === module) {
|
|
|
59
57
|
}require('source-map-support').install();
|
|
60
58
|
|
|
61
59
|
|
|
62
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
|
60
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbImNoZWNrRm9yR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yY2VSb290IjoiLi4ifQ==
|
package/build/lib/constants.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.WDA_UPGRADE_TIMESTAMP_PATH = exports.WDA_SCRIPTS_ROOT = exports.WDA_SCHEME = exports.WDA_RUNNER_BUNDLE_ID = exports.WDA_RUNNER_APP = exports.WDA_PROJECT = exports.
|
|
8
|
+
exports.WDA_UPGRADE_TIMESTAMP_PATH = exports.WDA_SCRIPTS_ROOT = exports.WDA_SCHEME = exports.WDA_RUNNER_BUNDLE_ID = exports.WDA_RUNNER_APP = exports.WDA_PROJECT = exports.WDA_BASE_URL = exports.SDK_SIMULATOR = exports.SDK_DEVICE = exports.PROJECT_FILE = exports.PLATFORM_NAME_TVOS = exports.PLATFORM_NAME_IOS = exports.BOOTSTRAP_PATH = void 0;
|
|
9
9
|
|
|
10
10
|
require("source-map-support/register");
|
|
11
11
|
|
|
@@ -13,8 +13,6 @@ var _path = _interopRequireDefault(require("path"));
|
|
|
13
13
|
|
|
14
14
|
const BOOTSTRAP_PATH = __dirname.endsWith('build') ? _path.default.resolve(__dirname, '..', '..', '..') : _path.default.resolve(__dirname, '..', '..');
|
|
15
15
|
exports.BOOTSTRAP_PATH = BOOTSTRAP_PATH;
|
|
16
|
-
const WDA_BUNDLE_ID = 'com.apple.test.WebDriverAgentRunner-Runner';
|
|
17
|
-
exports.WDA_BUNDLE_ID = WDA_BUNDLE_ID;
|
|
18
16
|
|
|
19
17
|
const WDA_PROJECT = _path.default.join(BOOTSTRAP_PATH, 'WebDriverAgent.xcodeproj');
|
|
20
18
|
|
|
@@ -47,4 +45,4 @@ const WDA_UPGRADE_TIMESTAMP_PATH = _path.default.join('.appium', 'webdriveragent
|
|
|
47
45
|
exports.WDA_UPGRADE_TIMESTAMP_PATH = WDA_UPGRADE_TIMESTAMP_PATH;require('source-map-support').install();
|
|
48
46
|
|
|
49
47
|
|
|
50
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
|
48
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9jb25zdGFudHMuanMiXSwibmFtZXMiOlsiQk9PVFNUUkFQX1BBVEgiLCJfX2Rpcm5hbWUiLCJlbmRzV2l0aCIsInBhdGgiLCJyZXNvbHZlIiwiV0RBX1BST0pFQ1QiLCJqb2luIiwiV0RBX1NDUklQVFNfUk9PVCIsIldEQV9SVU5ORVJfQlVORExFX0lEIiwiV0RBX1JVTk5FUl9BUFAiLCJXREFfU0NIRU1FIiwiUFJPSkVDVF9GSUxFIiwiV0RBX0JBU0VfVVJMIiwiUExBVEZPUk1fTkFNRV9UVk9TIiwiUExBVEZPUk1fTkFNRV9JT1MiLCJTREtfU0lNVUxBVE9SIiwiU0RLX0RFVklDRSIsIldEQV9VUEdSQURFX1RJTUVTVEFNUF9QQVRIIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBOztBQUdBLE1BQU1BLGNBQWMsR0FBR0MsU0FBUyxDQUFDQyxRQUFWLENBQW1CLE9BQW5CLElBQ25CQyxjQUFLQyxPQUFMLENBQWFILFNBQWIsRUFBd0IsSUFBeEIsRUFBOEIsSUFBOUIsRUFBb0MsSUFBcEMsQ0FEbUIsR0FFbkJFLGNBQUtDLE9BQUwsQ0FBYUgsU0FBYixFQUF3QixJQUF4QixFQUE4QixJQUE5QixDQUZKOzs7QUFHQSxNQUFNSSxXQUFXLEdBQUdGLGNBQUtHLElBQUwsQ0FBVU4sY0FBVixFQUEwQiwwQkFBMUIsQ0FBcEI7Ozs7QUFDQSxNQUFNTyxnQkFBZ0IsR0FBR0osY0FBS0csSUFBTCxDQUFVTixjQUFWLEVBQTBCLFNBQTFCLENBQXpCOzs7QUFDQSxNQUFNUSxvQkFBb0IsR0FBRyxtQ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ZXJBZ2VudFJ1bm5lcic7XG5jb25zdCBQUk9KRUNUX0ZJTEUgPSAncHJvamVjdC5wYnhwcm9qJztcbmNvbnN0IFdEQV9CQVNFX1VSTCA9ICdodHRwOi8vMTI3LjAuMC4xJztcblxuY29uc3QgUExBVEZPUk1fTkFNRV9UVk9TID0gJ3R2T1MnO1xuY29uc3QgUExBVEZPUk1fTkFNRV9JT1MgPSAnaU9TJztcblxuY29uc3QgU0RLX1NJTVVMQVRPUiA9ICdpcGhvbmVzaW11bGF0b3InO1xuY29uc3QgU0RLX0RFVklDRSA9ICdpcGhvbmVvcyc7XG5cbmNvbnN0IFdEQV9VUEdSQURFX1RJTUVTVEFNUF9QQVRIID0gcGF0aC5qb2luKCcuYXBwaXVtJywgJ3dlYmRyaXZlcmFnZW50JywgJ3VwZ3JhZGUudGltZScpO1xuXG5leHBvcnQge1xuICBCT09UU1RSQVBfUEFUSCxcbiAgV0RBX1JVTk5FUl9CVU5ETEVfSUQsIFdEQV9SVU5ORVJfQVBQLCBQUk9KRUNUX0ZJTEUsXG4gIFdEQV9QUk9KRUNULCBXREFfU0NIRU1FLFxuICBQTEFURk9STV9OQU1FX1RWT1MsIFBMQVRGT1JNX05BTUVfSU9TLFxuICBTREtfU0lNVUxBVE9SLCBTREtfREVWSUNFLFxuICBXREFfQkFTRV9VUkwsIFdEQV9TQ1JJUFRTX1JPT1QsIFdEQV9VUEdSQURFX1RJTUVTVEFNUF9QQVRIXG59O1xuIl0sImZpbGUiOiJsaWIvY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uIn0=
|
package/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { asyncify } from 'asyncbox';
|
|
|
9
9
|
const { checkForDependencies, bundleWDASim } = dependencies;
|
|
10
10
|
const { NoSessionProxy } = proxies;
|
|
11
11
|
const { WebDriverAgent } = driver;
|
|
12
|
-
const {
|
|
12
|
+
const { BOOTSTRAP_PATH, WDA_BASE_URL, WDA_RUNNER_BUNDLE_ID, PROJECT_FILE } = constants;
|
|
13
13
|
const { resetTestProcesses } = utils;
|
|
14
14
|
|
|
15
15
|
|
|
@@ -23,7 +23,7 @@ export {
|
|
|
23
23
|
NoSessionProxy,
|
|
24
24
|
checkForDependencies, bundleWDASim,
|
|
25
25
|
resetTestProcesses,
|
|
26
|
-
BOOTSTRAP_PATH,
|
|
26
|
+
BOOTSTRAP_PATH,
|
|
27
27
|
WDA_RUNNER_BUNDLE_ID, PROJECT_FILE,
|
|
28
28
|
WDA_BASE_URL,
|
|
29
29
|
};
|
package/lib/constants.js
CHANGED
|
@@ -4,7 +4,6 @@ import path from 'path';
|
|
|
4
4
|
const BOOTSTRAP_PATH = __dirname.endsWith('build')
|
|
5
5
|
? path.resolve(__dirname, '..', '..', '..')
|
|
6
6
|
: path.resolve(__dirname, '..', '..');
|
|
7
|
-
const WDA_BUNDLE_ID = 'com.apple.test.WebDriverAgentRunner-Runner';
|
|
8
7
|
const WDA_PROJECT = path.join(BOOTSTRAP_PATH, 'WebDriverAgent.xcodeproj');
|
|
9
8
|
const WDA_SCRIPTS_ROOT = path.join(BOOTSTRAP_PATH, 'Scripts');
|
|
10
9
|
const WDA_RUNNER_BUNDLE_ID = 'com.facebook.WebDriverAgentRunner';
|
|
@@ -22,7 +21,7 @@ const SDK_DEVICE = 'iphoneos';
|
|
|
22
21
|
const WDA_UPGRADE_TIMESTAMP_PATH = path.join('.appium', 'webdriveragent', 'upgrade.time');
|
|
23
22
|
|
|
24
23
|
export {
|
|
25
|
-
BOOTSTRAP_PATH,
|
|
24
|
+
BOOTSTRAP_PATH,
|
|
26
25
|
WDA_RUNNER_BUNDLE_ID, WDA_RUNNER_APP, PROJECT_FILE,
|
|
27
26
|
WDA_PROJECT, WDA_SCHEME,
|
|
28
27
|
PLATFORM_NAME_TVOS, PLATFORM_NAME_IOS,
|