appium-mac2-driver 2.0.0 → 2.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +81 -2
  3. package/WebDriverAgentMac/IntegrationTests/AMVideoRecordingTests.m +57 -0
  4. package/WebDriverAgentMac/WebDriverAgentLib/Commands/AMVideoCommands.h +27 -0
  5. package/WebDriverAgentMac/WebDriverAgentLib/Commands/AMVideoCommands.m +120 -0
  6. package/WebDriverAgentMac/WebDriverAgentLib/Commands/FBDebugCommands.m +17 -0
  7. package/WebDriverAgentMac/WebDriverAgentLib/Commands/FBScreenshotCommands.m +8 -8
  8. package/WebDriverAgentMac/WebDriverAgentLib/Routing/AMXCTRunnerDaemonSession.h +31 -0
  9. package/WebDriverAgentMac/WebDriverAgentLib/Routing/AMXCTRunnerDaemonSessionWrapper.h +39 -0
  10. package/WebDriverAgentMac/WebDriverAgentLib/Routing/AMXCTRunnerDaemonSessionWrapper.m +43 -0
  11. package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBScreenRecordingContainer.h +59 -0
  12. package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBScreenRecordingContainer.m +74 -0
  13. package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBScreenRecordingPromise.h +34 -0
  14. package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBScreenRecordingPromise.m +32 -0
  15. package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBScreenRecordingRequest.h +44 -0
  16. package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBScreenRecordingRequest.m +97 -0
  17. package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBSession.m +14 -0
  18. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMScreenUtils.h +49 -0
  19. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMScreenUtils.m +49 -0
  20. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMVideoRecorder.h +50 -0
  21. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMVideoRecorder.m +112 -0
  22. package/WebDriverAgentMac/WebDriverAgentMac.xcodeproj/project.pbxproj +64 -0
  23. package/build/lib/commands/helpers.d.ts +4 -0
  24. package/build/lib/commands/helpers.d.ts.map +1 -0
  25. package/build/lib/commands/helpers.js +28 -0
  26. package/build/lib/commands/helpers.js.map +1 -0
  27. package/build/lib/commands/native-record-screen.d.ts +75 -0
  28. package/build/lib/commands/native-record-screen.d.ts.map +1 -0
  29. package/build/lib/commands/native-record-screen.js +139 -0
  30. package/build/lib/commands/native-record-screen.js.map +1 -0
  31. package/build/lib/commands/record-screen.d.ts.map +1 -1
  32. package/build/lib/commands/record-screen.js +2 -28
  33. package/build/lib/commands/record-screen.js.map +1 -1
  34. package/build/lib/driver.d.ts +25 -0
  35. package/build/lib/driver.d.ts.map +1 -1
  36. package/build/lib/driver.js +13 -0
  37. package/build/lib/driver.js.map +1 -1
  38. package/build/lib/execute-method-map.d.ts +18 -0
  39. package/build/lib/execute-method-map.d.ts.map +1 -1
  40. package/build/lib/execute-method-map.js +30 -0
  41. package/build/lib/execute-method-map.js.map +1 -1
  42. package/lib/commands/helpers.ts +30 -0
  43. package/lib/commands/native-record-screen.ts +180 -0
  44. package/lib/commands/record-screen.js +2 -30
  45. package/lib/driver.js +18 -0
  46. package/lib/execute-method-map.ts +30 -0
  47. package/npm-shrinkwrap.json +2 -2
  48. package/package.json +1 -1
@@ -0,0 +1,32 @@
1
+ /**
2
+ *
3
+ * Copyright (c) 2015-present, Facebook, Inc.
4
+ * All rights reserved.
5
+ *
6
+ * This source code is licensed under the BSD-style license found in the
7
+ * LICENSE file in the root directory of this source tree. An additional grant
8
+ * of patent rights can be found in the PATENTS file in the same directory.
9
+ */
10
+
11
+ #import "FBScreenRecordingPromise.h"
12
+
13
+ @interface FBScreenRecordingPromise ()
14
+ @property (readwrite) id nativePromise;
15
+ @end
16
+
17
+ @implementation FBScreenRecordingPromise
18
+
19
+ - (instancetype)initWithNativePromise:(id)promise
20
+ {
21
+ if ((self = [super init])) {
22
+ self.nativePromise = promise;
23
+ }
24
+ return self;
25
+ }
26
+
27
+ - (NSUUID *)identifier
28
+ {
29
+ return (NSUUID *)[self.nativePromise valueForKey:@"_UUID"];
30
+ }
31
+
32
+ @end
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Copyright (c) 2015-present, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ */
9
+
10
+ #import <XCTest/XCTest.h>
11
+
12
+ NS_ASSUME_NONNULL_BEGIN
13
+
14
+ @interface FBScreenRecordingRequest : NSObject
15
+
16
+ /** The amount of video FPS */
17
+ @property (readonly, nonatomic) NSUInteger fps;
18
+ /** Codec to use, where 0 is h264, 1 - HEVC */
19
+ @property (readonly, nonatomic) long long codec;
20
+ @property (readonly, nonatomic, nullable) NSNumber *displayID;
21
+
22
+ /**
23
+ Creates a custom wrapper for a screen recording reqeust
24
+
25
+ @param fps FPS value, see baove
26
+ @param codec Codex value, see above
27
+ @param displayID Valid display identifier or nil to use the main display
28
+ */
29
+ - (instancetype)initWithFps:(NSUInteger)fps
30
+ codec:(long long)codec
31
+ displayID:(nullable NSNumber *)displayID;
32
+
33
+ /**
34
+ Transforms the current wrapper instance to a native object,
35
+ which is ready to be passed to XCTest APIs
36
+
37
+ @param error If there was a failure converting the instance to a native object
38
+ @returns Native object instance
39
+ */
40
+ - (nullable id)toNativeRequestWithError:(NSError **)error;
41
+
42
+ @end
43
+
44
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Copyright (c) 2015-present, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ */
9
+
10
+ #import "FBScreenRecordingRequest.h"
11
+
12
+ #import "FBErrorBuilder.h"
13
+
14
+ @implementation FBScreenRecordingRequest
15
+
16
+ - (instancetype)initWithFps:(NSUInteger)fps codec:(long long)codec displayID:(NSNumber *)displayID
17
+ {
18
+ if ((self = [super init])) {
19
+ _fps = fps;
20
+ _codec = codec;
21
+ _displayID = displayID;
22
+ }
23
+ return self;
24
+ }
25
+
26
+ - (nullable id)createVideoEncodingWithError:(NSError **)error
27
+ {
28
+ Class videoEncodingClass = NSClassFromString(@"XCTVideoEncoding");
29
+ if (nil == videoEncodingClass) {
30
+ [[[FBErrorBuilder builder]
31
+ withDescription:@"Cannot find XCTVideoEncoding class"]
32
+ buildError:error];
33
+ return nil;
34
+ }
35
+
36
+ id videoEncodingAllocated = [videoEncodingClass alloc];
37
+ SEL videoEncodingConstructorSelector = NSSelectorFromString(@"initWithCodec:frameRate:");
38
+ if (![videoEncodingAllocated respondsToSelector:videoEncodingConstructorSelector]) {
39
+ [[[FBErrorBuilder builder]
40
+ withDescription:@"'initWithCodec:frameRate:' contructor is not found on XCTVideoEncoding class"]
41
+ buildError:error];
42
+ return nil;
43
+ }
44
+
45
+ NSMethodSignature *videoEncodingContructorSignature = [videoEncodingAllocated methodSignatureForSelector:videoEncodingConstructorSelector];
46
+ NSInvocation *videoEncodingInitInvocation = [NSInvocation invocationWithMethodSignature:videoEncodingContructorSignature];
47
+ [videoEncodingInitInvocation setSelector:videoEncodingConstructorSelector];
48
+ long long codec = self.codec;
49
+ [videoEncodingInitInvocation setArgument:&codec atIndex:2];
50
+ double frameRate = self.fps;
51
+ [videoEncodingInitInvocation setArgument:&frameRate atIndex:3];
52
+ [videoEncodingInitInvocation invokeWithTarget:videoEncodingAllocated];
53
+ id __unsafe_unretained result;
54
+ [videoEncodingInitInvocation getReturnValue:&result];
55
+ return result;
56
+ }
57
+
58
+ - (id)toNativeRequestWithError:(NSError **)error
59
+ {
60
+ Class screenRecordingRequestClass = NSClassFromString(@"XCTScreenRecordingRequest");
61
+ if (nil == screenRecordingRequestClass) {
62
+ [[[FBErrorBuilder builder]
63
+ withDescription:@"Cannot find XCTScreenRecordingRequest class"]
64
+ buildError:error];
65
+ return nil;
66
+ }
67
+
68
+ id screenRecordingRequestAllocated = [screenRecordingRequestClass alloc];
69
+ SEL screenRecordingRequestConstructorSelector = NSSelectorFromString(@"initWithScreenID:rect:preferredEncoding:");
70
+ if (![screenRecordingRequestAllocated respondsToSelector:screenRecordingRequestConstructorSelector]) {
71
+ [[[FBErrorBuilder builder]
72
+ withDescription:@"'initWithScreenID:rect:preferredEncoding:' contructor is not found on XCTScreenRecordingRequest class"]
73
+ buildError:error];
74
+ return nil;
75
+ }
76
+ id videoEncoding = [self createVideoEncodingWithError:error];
77
+ if (nil == videoEncoding) {
78
+ return nil;
79
+ }
80
+
81
+ NSMethodSignature *screenRecordingRequestContructorSignature = [screenRecordingRequestAllocated methodSignatureForSelector:screenRecordingRequestConstructorSelector];
82
+ NSInvocation *screenRecordingRequestInitInvocation = [NSInvocation invocationWithMethodSignature:screenRecordingRequestContructorSignature];
83
+ [screenRecordingRequestInitInvocation setSelector:screenRecordingRequestConstructorSelector];
84
+ long long screenId = nil == self.displayID
85
+ ? [[XCUIScreen.mainScreen valueForKey:@"_displayID"] longLongValue]
86
+ : self.displayID.longLongValue;
87
+ [screenRecordingRequestInitInvocation setArgument:&screenId atIndex:2];
88
+ CGRect fullScreenRect = CGRectNull;
89
+ [screenRecordingRequestInitInvocation setArgument:&fullScreenRect atIndex:3];
90
+ [screenRecordingRequestInitInvocation setArgument:&videoEncoding atIndex:4];
91
+ [screenRecordingRequestInitInvocation invokeWithTarget:screenRecordingRequestAllocated];
92
+ id __unsafe_unretained result;
93
+ [screenRecordingRequestInitInvocation getReturnValue:&result];
94
+ return result;
95
+ }
96
+
97
+ @end
@@ -17,6 +17,9 @@
17
17
  #import "FBExceptions.h"
18
18
  #import "FBMacros.h"
19
19
  #import "XCUIApplication+AMHelpers.h"
20
+ #import "FBScreenRecordingContainer.h"
21
+ #import "FBScreenRecordingPromise.h"
22
+ #import "AMVideoRecorder.h"
20
23
 
21
24
  NSString *const FINDER_BUNDLE_ID = @"com.apple.finder";
22
25
 
@@ -69,6 +72,17 @@ static FBSession *_activeSession = nil;
69
72
  [self.testedApplication terminate];
70
73
  }
71
74
  self.testedApplication = nil;
75
+ FBScreenRecordingContainer *screenRecordingContainer = FBScreenRecordingContainer.sharedInstance;
76
+ NSUUID *videoRecordingId = screenRecordingContainer.screenRecordingPromise.identifier;
77
+ if (nil != videoRecordingId) {
78
+ NSError *error;
79
+ if (![AMVideoRecorder.sharedInstance stopScreenRecordingWithUUID:videoRecordingId error:&error]) {
80
+ NSLog(@"Could not stop the active video recording. Original error: %@", error.description);
81
+ }
82
+ }
83
+ if (nil != screenRecordingContainer.screenRecordingPromise) {
84
+ [screenRecordingContainer reset];
85
+ }
72
86
  [self.elementCache reset];
73
87
  _activeSession = nil;
74
88
  }
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Licensed under the Apache License, Version 2.0 (the "License");
3
+ * you may not use this file except in compliance with the License.
4
+ * See the NOTICE file distributed with this work for additional
5
+ * information regarding copyright ownership.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #import <XCTest/XCTest.h>
18
+
19
+ NS_ASSUME_NONNULL_BEGIN
20
+
21
+ @interface AMScreenProperties: NSObject
22
+
23
+ /** YES if the corresponding screen is a main screen */
24
+ @property (readonly, nonatomic) BOOL isMain;
25
+ /** The integer indentifier of a screen */
26
+ @property (readonly, nonatomic) long long identifier;
27
+
28
+ @end
29
+
30
+ /**
31
+ Lists information about available screens
32
+
33
+ @returns Screen infos
34
+ */
35
+ NSArray<AMScreenProperties *> *AMListScreens(void);
36
+
37
+ /**
38
+ Retrieves identifies from a XCUIScreen instance
39
+
40
+ @returns Screen identifier
41
+ */
42
+ long long AMFetchScreenId(XCUIScreen *screen);
43
+
44
+ /**
45
+ @returns YES if the given screen is the main one
46
+ */
47
+ BOOL AMIsMainScreen(XCUIScreen *screen);
48
+
49
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Licensed under the Apache License, Version 2.0 (the "License");
3
+ * you may not use this file except in compliance with the License.
4
+ * See the NOTICE file distributed with this work for additional
5
+ * information regarding copyright ownership.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #import "AMScreenUtils.h"
18
+
19
+ @implementation AMScreenProperties
20
+
21
+ - (instancetype)initWithIdentifier:(long long)identifier
22
+ isMain:(BOOL)isMain
23
+ {
24
+ if ((self = [super init])) {
25
+ _identifier = identifier;
26
+ _isMain = isMain;
27
+ }
28
+ return self;
29
+ }
30
+
31
+ @end
32
+
33
+ NSArray<AMScreenProperties *> *AMListScreens(void) {
34
+ NSMutableArray<AMScreenProperties *> *result = [NSMutableArray new];
35
+ for (XCUIScreen *screen in XCUIScreen.screens) {
36
+ AMScreenProperties *info = [[AMScreenProperties alloc] initWithIdentifier:AMFetchScreenId(screen)
37
+ isMain:AMIsMainScreen(screen)];
38
+ [result addObject:info];
39
+ }
40
+ return result.copy;
41
+ }
42
+
43
+ long long AMFetchScreenId(XCUIScreen *screen) {
44
+ return [[screen valueForKey:@"_displayID"] longLongValue];
45
+ }
46
+
47
+ BOOL AMIsMainScreen(XCUIScreen *screen) {
48
+ return [[screen valueForKey:@"_isMainScreen"] boolValue];
49
+ }
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Licensed under the Apache License, Version 2.0 (the "License");
3
+ * you may not use this file except in compliance with the License.
4
+ * See the NOTICE file distributed with this work for additional
5
+ * information regarding copyright ownership.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #import <Foundation/Foundation.h>
18
+
19
+ @class FBScreenRecordingPromise;
20
+ @class FBScreenRecordingRequest;
21
+
22
+ NS_ASSUME_NONNULL_BEGIN
23
+
24
+ @interface AMVideoRecorder : NSObject
25
+
26
+ + (instancetype)sharedInstance;
27
+
28
+ /**
29
+ Starts native video recording
30
+
31
+ @param request Video recording options
32
+ @param error Actual error instance if there was an error while starting the video recording
33
+ @returns The recording promise or nil in case of failure
34
+ */
35
+ - (nullable FBScreenRecordingPromise *)startScreenRecordingWithRequest:(FBScreenRecordingRequest *)request
36
+ error:(NSError **)error;
37
+
38
+ /**
39
+ Stops native video recording
40
+
41
+ @param uuid The unique identifier of the recording process
42
+ @param error Actual error instance if there was an error while stopping the video recording
43
+ @returns YES if the recording has been successfully stopped
44
+ */
45
+ - (BOOL)stopScreenRecordingWithUUID:(NSUUID *)uuid
46
+ error:(NSError **)error;
47
+
48
+ @end
49
+
50
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,112 @@
1
+ /*
2
+ * Licensed under the Apache License, Version 2.0 (the "License");
3
+ * you may not use this file except in compliance with the License.
4
+ * See the NOTICE file distributed with this work for additional
5
+ * information regarding copyright ownership.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #import "AMVideoRecorder.h"
18
+
19
+ #import "FBErrorBuilder.h"
20
+ #import "FBScreenRecordingPromise.h"
21
+ #import "FBScreenRecordingRequest.h"
22
+ #import "FBRunLoopSpinner.h"
23
+ #import "AMXCTRunnerDaemonSessionWrapper.h"
24
+ #import "AMXCTRunnerDaemonSession.h"
25
+
26
+
27
+ @implementation AMVideoRecorder
28
+
29
+ + (instancetype)sharedInstance
30
+ {
31
+ static AMVideoRecorder *instance;
32
+ static dispatch_once_t onceToken;
33
+ dispatch_once(&onceToken, ^{
34
+ instance = [[self alloc] init];
35
+ });
36
+ return instance;
37
+ }
38
+
39
+ - (FBScreenRecordingPromise *)startScreenRecordingWithRequest:(FBScreenRecordingRequest *)request
40
+ error:(NSError *__autoreleasing*)error
41
+ {
42
+ AMXCTRunnerDaemonSessionWrapper *wrapper = AMXCTRunnerDaemonSessionWrapper.sharedInstance;
43
+ if (!wrapper.canRecordVideo) {
44
+ [[[FBErrorBuilder builder]
45
+ withDescriptionFormat:@"The current Xcode SDK does not support screen recording. Consider upgrading to Xcode 15+"]
46
+ buildError:error];
47
+ return nil;
48
+ }
49
+ if (![wrapper.daemonSession supportsScreenRecording]) {
50
+ [[[FBErrorBuilder builder]
51
+ withDescriptionFormat:@"Your device does not support screen recording"]
52
+ buildError:error];
53
+ return nil;
54
+ }
55
+
56
+ id nativeRequest = [request toNativeRequestWithError:error];
57
+ if (nil == nativeRequest) {
58
+ return nil;
59
+ }
60
+
61
+ __block id futureMetadata = nil;
62
+ __block NSError *innerError = nil;
63
+ [FBRunLoopSpinner spinUntilCompletion:^(void(^completion)(void)){
64
+ [wrapper.daemonSession startScreenRecordingWithRequest:nativeRequest withReply:^(id reply, NSError *invokeError) {
65
+ if (nil == invokeError) {
66
+ futureMetadata = reply;
67
+ } else {
68
+ innerError = invokeError;
69
+ }
70
+ completion();
71
+ }];
72
+ }];
73
+ if (nil != innerError) {
74
+ if (error) {
75
+ *error = innerError;
76
+ }
77
+ return nil;
78
+ }
79
+ return [[FBScreenRecordingPromise alloc] initWithNativePromise:futureMetadata];
80
+ }
81
+
82
+ - (BOOL)stopScreenRecordingWithUUID:(NSUUID *)uuid error:(NSError *__autoreleasing*)error
83
+ {
84
+ AMXCTRunnerDaemonSessionWrapper *wrapper = AMXCTRunnerDaemonSessionWrapper.sharedInstance;
85
+ if (!wrapper.canRecordVideo) {
86
+ return [[[FBErrorBuilder builder]
87
+ withDescriptionFormat:@"The current Xcode SDK does not support screen recording. Consider upgrading to Xcode 15+"]
88
+ buildError:error];
89
+
90
+ }
91
+ if (![wrapper.daemonSession supportsScreenRecording]) {
92
+ return [[[FBErrorBuilder builder]
93
+ withDescriptionFormat:@"Your device does not support screen recording"]
94
+ buildError:error];
95
+ }
96
+
97
+ __block NSError *innerError = nil;
98
+ [FBRunLoopSpinner spinUntilCompletion:^(void(^completion)(void)){
99
+ [wrapper.daemonSession stopScreenRecordingWithUUID:uuid withReply:^(NSError *invokeError) {
100
+ if (nil != invokeError) {
101
+ innerError = invokeError;
102
+ }
103
+ completion();
104
+ }];
105
+ }];
106
+ if (nil != innerError && error) {
107
+ *error = innerError;
108
+ }
109
+ return nil == innerError;
110
+ }
111
+
112
+ @end
@@ -119,6 +119,20 @@
119
119
  713A9D382566A83800118D07 /* FBElementCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = 713A9D362566A83800118D07 /* FBElementCommands.m */; };
120
120
  713A9D3C2566AA2300118D07 /* AMGeometryUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 713A9D3A2566AA2300118D07 /* AMGeometryUtils.h */; };
121
121
  713A9D3D2566AA2300118D07 /* AMGeometryUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 713A9D3B2566AA2300118D07 /* AMGeometryUtils.m */; };
122
+ 71440CC72D54AB460048EA32 /* AMVideoCommands.h in Headers */ = {isa = PBXBuildFile; fileRef = 71440CC52D54AB460048EA32 /* AMVideoCommands.h */; };
123
+ 71440CC82D54AB460048EA32 /* AMVideoCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = 71440CC62D54AB460048EA32 /* AMVideoCommands.m */; };
124
+ 71440CCF2D54AB9C0048EA32 /* FBScreenRecordingContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 71440CC92D54AB9C0048EA32 /* FBScreenRecordingContainer.h */; };
125
+ 71440CD02D54AB9C0048EA32 /* FBScreenRecordingRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 71440CCD2D54AB9C0048EA32 /* FBScreenRecordingRequest.h */; };
126
+ 71440CD12D54AB9C0048EA32 /* FBScreenRecordingPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 71440CCB2D54AB9C0048EA32 /* FBScreenRecordingPromise.h */; };
127
+ 71440CD22D54AB9C0048EA32 /* FBScreenRecordingPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 71440CCC2D54AB9C0048EA32 /* FBScreenRecordingPromise.m */; };
128
+ 71440CD32D54AB9C0048EA32 /* FBScreenRecordingContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 71440CCA2D54AB9C0048EA32 /* FBScreenRecordingContainer.m */; };
129
+ 71440CD42D54AB9C0048EA32 /* FBScreenRecordingRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 71440CCE2D54AB9C0048EA32 /* FBScreenRecordingRequest.m */; };
130
+ 71440CD72D54AC590048EA32 /* AMVideoRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 71440CD52D54AC590048EA32 /* AMVideoRecorder.h */; };
131
+ 71440CD82D54AC590048EA32 /* AMVideoRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 71440CD62D54AC590048EA32 /* AMVideoRecorder.m */; };
132
+ 71440CDB2D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 71440CD92D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.h */; };
133
+ 71440CDC2D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 71440CDA2D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.m */; };
134
+ 71440CDE2D54B2410048EA32 /* AMXCTRunnerDaemonSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 71440CDD2D54B2410048EA32 /* AMXCTRunnerDaemonSession.h */; };
135
+ 71440CE02D54D8C90048EA32 /* AMVideoRecordingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 71440CDF2D54D8C90048EA32 /* AMVideoRecordingTests.m */; };
122
136
  714CA6FC2566461100353B27 /* FBDebugCommands.h in Headers */ = {isa = PBXBuildFile; fileRef = 714CA6FA2566461100353B27 /* FBDebugCommands.h */; };
123
137
  714CA6FD2566461100353B27 /* FBDebugCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = 714CA6FB2566461100353B27 /* FBDebugCommands.m */; };
124
138
  714CA7012566475200353B27 /* XCUIApplication+AMSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 714CA6FF2566475200353B27 /* XCUIApplication+AMSource.h */; };
@@ -193,6 +207,8 @@
193
207
  71B8B68126726369009CE50C /* AMSwipeHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 71B8B67F26726369009CE50C /* AMSwipeHelpers.h */; };
194
208
  71B8B68226726369009CE50C /* AMSwipeHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 71B8B68026726369009CE50C /* AMSwipeHelpers.m */; };
195
209
  71B8B684267265D7009CE50C /* AMVariousElementTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 71B8B683267265D7009CE50C /* AMVariousElementTests.m */; };
210
+ 71E109222D55EBD0008A800D /* AMScreenUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E109212D55EBD0008A800D /* AMScreenUtils.m */; };
211
+ 71E109232D55EBD0008A800D /* AMScreenUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E109202D55EBD0008A800D /* AMScreenUtils.h */; };
196
212
  /* End PBXBuildFile section */
197
213
 
198
214
  /* Begin PBXContainerItemProxy section */
@@ -272,6 +288,20 @@
272
288
  713A9D362566A83800118D07 /* FBElementCommands.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBElementCommands.m; sourceTree = "<group>"; };
273
289
  713A9D3A2566AA2300118D07 /* AMGeometryUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMGeometryUtils.h; sourceTree = "<group>"; };
274
290
  713A9D3B2566AA2300118D07 /* AMGeometryUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMGeometryUtils.m; sourceTree = "<group>"; };
291
+ 71440CC52D54AB460048EA32 /* AMVideoCommands.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMVideoCommands.h; sourceTree = "<group>"; };
292
+ 71440CC62D54AB460048EA32 /* AMVideoCommands.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMVideoCommands.m; sourceTree = "<group>"; };
293
+ 71440CC92D54AB9C0048EA32 /* FBScreenRecordingContainer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBScreenRecordingContainer.h; sourceTree = "<group>"; };
294
+ 71440CCA2D54AB9C0048EA32 /* FBScreenRecordingContainer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBScreenRecordingContainer.m; sourceTree = "<group>"; };
295
+ 71440CCB2D54AB9C0048EA32 /* FBScreenRecordingPromise.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBScreenRecordingPromise.h; sourceTree = "<group>"; };
296
+ 71440CCC2D54AB9C0048EA32 /* FBScreenRecordingPromise.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBScreenRecordingPromise.m; sourceTree = "<group>"; };
297
+ 71440CCD2D54AB9C0048EA32 /* FBScreenRecordingRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBScreenRecordingRequest.h; sourceTree = "<group>"; };
298
+ 71440CCE2D54AB9C0048EA32 /* FBScreenRecordingRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBScreenRecordingRequest.m; sourceTree = "<group>"; };
299
+ 71440CD52D54AC590048EA32 /* AMVideoRecorder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMVideoRecorder.h; sourceTree = "<group>"; };
300
+ 71440CD62D54AC590048EA32 /* AMVideoRecorder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMVideoRecorder.m; sourceTree = "<group>"; };
301
+ 71440CD92D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMXCTRunnerDaemonSessionWrapper.h; sourceTree = "<group>"; };
302
+ 71440CDA2D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMXCTRunnerDaemonSessionWrapper.m; sourceTree = "<group>"; };
303
+ 71440CDD2D54B2410048EA32 /* AMXCTRunnerDaemonSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMXCTRunnerDaemonSession.h; sourceTree = "<group>"; };
304
+ 71440CDF2D54D8C90048EA32 /* AMVideoRecordingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMVideoRecordingTests.m; sourceTree = "<group>"; };
275
305
  714CA6FA2566461100353B27 /* FBDebugCommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBDebugCommands.h; sourceTree = "<group>"; };
276
306
  714CA6FB2566461100353B27 /* FBDebugCommands.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBDebugCommands.m; sourceTree = "<group>"; };
277
307
  714CA6FF2566475200353B27 /* XCUIApplication+AMSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "XCUIApplication+AMSource.h"; sourceTree = "<group>"; };
@@ -431,6 +461,8 @@
431
461
  71B8B67F26726369009CE50C /* AMSwipeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMSwipeHelpers.h; sourceTree = "<group>"; };
432
462
  71B8B68026726369009CE50C /* AMSwipeHelpers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMSwipeHelpers.m; sourceTree = "<group>"; };
433
463
  71B8B683267265D7009CE50C /* AMVariousElementTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMVariousElementTests.m; sourceTree = "<group>"; };
464
+ 71E109202D55EBD0008A800D /* AMScreenUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMScreenUtils.h; sourceTree = "<group>"; };
465
+ 71E109212D55EBD0008A800D /* AMScreenUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMScreenUtils.m; sourceTree = "<group>"; };
434
466
  /* End PBXFileReference section */
435
467
 
436
468
  /* Begin PBXFrameworksBuildPhase section */
@@ -634,6 +666,8 @@
634
666
  71688B00256469310007F55B /* Commands */ = {
635
667
  isa = PBXGroup;
636
668
  children = (
669
+ 71440CC52D54AB460048EA32 /* AMVideoCommands.h */,
670
+ 71440CC62D54AB460048EA32 /* AMVideoCommands.m */,
637
671
  7180C1D8257A9369008FA870 /* AMActionCommands.h */,
638
672
  7180C1D9257A9369008FA870 /* AMActionCommands.m */,
639
673
  712FA08F288BD68100976DA8 /* AMWindowCommands.h */,
@@ -659,6 +693,9 @@
659
693
  71688B01256469350007F55B /* Routing */ = {
660
694
  isa = PBXGroup;
661
695
  children = (
696
+ 71440CDD2D54B2410048EA32 /* AMXCTRunnerDaemonSession.h */,
697
+ 71440CD92D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.h */,
698
+ 71440CDA2D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.m */,
662
699
  7151AD3F2564F4C5008B8B2A /* FBCommandHandler.h */,
663
700
  7151AD4D2564F4C6008B8B2A /* FBCommandStatus.h */,
664
701
  7151AD442564F4C6008B8B2A /* FBCommandStatus.m */,
@@ -680,6 +717,12 @@
680
717
  710527DC2565716600130763 /* FBRouteRequest-Private.h */,
681
718
  7151AD422564F4C6008B8B2A /* FBRouteRequest.h */,
682
719
  7151AD432564F4C6008B8B2A /* FBRouteRequest.m */,
720
+ 71440CC92D54AB9C0048EA32 /* FBScreenRecordingContainer.h */,
721
+ 71440CCA2D54AB9C0048EA32 /* FBScreenRecordingContainer.m */,
722
+ 71440CCB2D54AB9C0048EA32 /* FBScreenRecordingPromise.h */,
723
+ 71440CCC2D54AB9C0048EA32 /* FBScreenRecordingPromise.m */,
724
+ 71440CCD2D54AB9C0048EA32 /* FBScreenRecordingRequest.h */,
725
+ 71440CCE2D54AB9C0048EA32 /* FBScreenRecordingRequest.m */,
683
726
  710527F22565744400130763 /* FBSession-Private.h */,
684
727
  7151AD472564F4C6008B8B2A /* FBSession.h */,
685
728
  7151AD4B2564F4C6008B8B2A /* FBSession.m */,
@@ -697,6 +740,8 @@
697
740
  713A9D3B2566AA2300118D07 /* AMGeometryUtils.m */,
698
741
  71AA30BD25EFF81900151CED /* AMKeyboardUtils.h */,
699
742
  71AA30BE25EFF81900151CED /* AMKeyboardUtils.m */,
743
+ 71E109202D55EBD0008A800D /* AMScreenUtils.h */,
744
+ 71E109212D55EBD0008A800D /* AMScreenUtils.m */,
700
745
  718D2C302567FED3005F533B /* AMSessionCapabilities.h */,
701
746
  718D2C312567FED3005F533B /* AMSessionCapabilities.m */,
702
747
  718D2BF125678B4E005F533B /* AMSnapshotUtils.h */,
@@ -705,6 +750,8 @@
705
750
  7151ADAC2564F570008B8B2A /* AMSettings.m */,
706
751
  71B8B67F26726369009CE50C /* AMSwipeHelpers.h */,
707
752
  71B8B68026726369009CE50C /* AMSwipeHelpers.m */,
753
+ 71440CD52D54AC590048EA32 /* AMVideoRecorder.h */,
754
+ 71440CD62D54AC590048EA32 /* AMVideoRecorder.m */,
708
755
  71336AF22BD1348F00997FF4 /* AMXCUIDeviceWrapper.h */,
709
756
  71336AF32BD1348F00997FF4 /* AMXCUIDeviceWrapper.m */,
710
757
  7180C1C8257A9336008FA870 /* FBBaseActionsSynthesizer.h */,
@@ -800,6 +847,7 @@
800
847
  718D2C072567A028005F533B /* AMElementAttributesTests.m */,
801
848
  718D2C202567D8A8005F533B /* AMEditElementTests.m */,
802
849
  71336AF62BD15B4D00997FF4 /* AMDeviceTests.m */,
850
+ 71440CDF2D54D8C90048EA32 /* AMVideoRecordingTests.m */,
803
851
  71B00E9F2566D9570010DA73 /* AMFindElementTests.m */,
804
852
  71B00E9C2566D7F10010DA73 /* AMIntegrationTestCase.h */,
805
853
  71B00E8D2566D4BA0010DA73 /* AMIntegrationTestCase.m */,
@@ -834,6 +882,7 @@
834
882
  7109C06B2565B607006BFD13 /* Route.h in Headers */,
835
883
  7109BFB62565B4F0006BFD13 /* FBClassChainQueryParser.h in Headers */,
836
884
  7109BFCC2565B512006BFD13 /* FBMacros.h in Headers */,
885
+ 71440CC72D54AB460048EA32 /* AMVideoCommands.h in Headers */,
837
886
  7109BFB02565B413006BFD13 /* WebDriverAgentLib.h in Headers */,
838
887
  718D2C0D2567AA03005F533B /* XCUIElement+AMEditable.h in Headers */,
839
888
  7109BFD42565B51E006BFD13 /* FBRunLoopSpinner.h in Headers */,
@@ -851,6 +900,7 @@
851
900
  7109C0202565B593006BFD13 /* FBSession.h in Headers */,
852
901
  713A9D3C2566AA2300118D07 /* AMGeometryUtils.h in Headers */,
853
902
  7109C01C2565B58C006BFD13 /* FBSession-Private.h in Headers */,
903
+ 71440CDB2D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.h in Headers */,
854
904
  7109BFED2565B546006BFD13 /* FBElementUtils.h in Headers */,
855
905
  7109C05D2565B5F6006BFD13 /* HTTPMessage.h in Headers */,
856
906
  71B8B67D26725A01009CE50C /* XCUICoordinate+AMSwipe.h in Headers */,
@@ -882,6 +932,9 @@
882
932
  713A9D312566A14200118D07 /* XCUIApplication+AMActiveElement.h in Headers */,
883
933
  71A5C67A29A4FAF900421C37 /* FBFailureProofTestCase.h in Headers */,
884
934
  714CA7062566487B00353B27 /* FBXPath.h in Headers */,
935
+ 71440CCF2D54AB9C0048EA32 /* FBScreenRecordingContainer.h in Headers */,
936
+ 71440CD02D54AB9C0048EA32 /* FBScreenRecordingRequest.h in Headers */,
937
+ 71440CD12D54AB9C0048EA32 /* FBScreenRecordingPromise.h in Headers */,
885
938
  7109BFF22565B54D006BFD13 /* FBExceptionHandler.h in Headers */,
886
939
  7109C0532565B5EA006BFD13 /* HTTPErrorResponse.h in Headers */,
887
940
  7180C1E9257A94F4008FA870 /* XCPointerEvent.h in Headers */,
@@ -890,6 +943,7 @@
890
943
  718D2C322567FED3005F533B /* AMSessionCapabilities.h in Headers */,
891
944
  7109BFE02565B536006BFD13 /* FBCommandHandler.h in Headers */,
892
945
  7109C0732565B611006BFD13 /* RouteResponse.h in Headers */,
946
+ 71440CD72D54AC590048EA32 /* AMVideoRecorder.h in Headers */,
893
947
  7109C04F2565B5E5006BFD13 /* HTTPDataResponse.h in Headers */,
894
948
  7109C0572565B5EE006BFD13 /* HTTPConnection.h in Headers */,
895
949
  7109C05B2565B5F3006BFD13 /* HTTPLogging.h in Headers */,
@@ -899,6 +953,7 @@
899
953
  7180C1D3257A9348008FA870 /* FBW3CActionsHelpers.h in Headers */,
900
954
  7109C0172565B581006BFD13 /* FBRouteRequest.h in Headers */,
901
955
  7180C216257AA707008FA870 /* XCUIElement+AMHitPoint.h in Headers */,
956
+ 71E109232D55EBD0008A800D /* AMScreenUtils.h in Headers */,
902
957
  719E6A6E25822DB800777988 /* XCUIApplication+AMUIInterruptions.h in Headers */,
903
958
  718D2BF325678B4E005F533B /* AMSnapshotUtils.h in Headers */,
904
959
  7109BFCF2565B517006BFD13 /* FBProtocolHelpers.h in Headers */,
@@ -917,6 +972,7 @@
917
972
  7109C0612565B5FA006BFD13 /* HTTPResponse.h in Headers */,
918
973
  7180C203257A9FAC008FA870 /* CDStructures.h in Headers */,
919
974
  71221BDA2588945400B4FBF5 /* GCDAsyncUdpSocket.h in Headers */,
975
+ 71440CDE2D54B2410048EA32 /* AMXCTRunnerDaemonSession.h in Headers */,
920
976
  7109BFFF2565B55D006BFD13 /* FBResponseJSONPayload.h in Headers */,
921
977
  7109BFE82565B540006BFD13 /* FBElementCache.h in Headers */,
922
978
  7109BFF72565B553006BFD13 /* FBExceptions.h in Headers */,
@@ -1100,8 +1156,11 @@
1100
1156
  isa = PBXSourcesBuildPhase;
1101
1157
  buildActionMask = 2147483647;
1102
1158
  files = (
1159
+ 71440CDC2D54AFC60048EA32 /* AMXCTRunnerDaemonSessionWrapper.m in Sources */,
1160
+ 71440CC82D54AB460048EA32 /* AMVideoCommands.m in Sources */,
1103
1161
  7109BFDC2565B529006BFD13 /* AMSettings.m in Sources */,
1104
1162
  71221BD92588945400B4FBF5 /* GCDAsyncSocket.m in Sources */,
1163
+ 71E109222D55EBD0008A800D /* AMScreenUtils.m in Sources */,
1105
1164
  713A9D3D2566AA2300118D07 /* AMGeometryUtils.m in Sources */,
1106
1165
  7109C0712565B60F006BFD13 /* RouteRequest.m in Sources */,
1107
1166
  7109C0312565B5AE006BFD13 /* FBScreenshotCommands.m in Sources */,
@@ -1114,6 +1173,9 @@
1114
1173
  7109C0792565B618006BFD13 /* RoutingConnection.m in Sources */,
1115
1174
  713A9D2325669A0F00118D07 /* FBFindElementCommands.m in Sources */,
1116
1175
  7109BFD22565B51C006BFD13 /* FBProtocolHelpers.m in Sources */,
1176
+ 71440CD22D54AB9C0048EA32 /* FBScreenRecordingPromise.m in Sources */,
1177
+ 71440CD32D54AB9C0048EA32 /* FBScreenRecordingContainer.m in Sources */,
1178
+ 71440CD42D54AB9C0048EA32 /* FBScreenRecordingRequest.m in Sources */,
1117
1179
  7109C0752565B613006BFD13 /* RouteResponse.m in Sources */,
1118
1180
  7109C0402565B5C4006BFD13 /* NSPredicate+FBFormat.m in Sources */,
1119
1181
  713A9D2725669A7000118D07 /* XCUIElement+FBFind.m in Sources */,
@@ -1131,6 +1193,7 @@
1131
1193
  7109C0692565B605006BFD13 /* HTTPResponseProxy.m in Sources */,
1132
1194
  718D2C0E2567AA03005F533B /* XCUIElement+AMEditable.m in Sources */,
1133
1195
  71AA30C025EFF81900151CED /* AMKeyboardUtils.m in Sources */,
1196
+ 71440CD82D54AC590048EA32 /* AMVideoRecorder.m in Sources */,
1134
1197
  713A9D382566A83800118D07 /* FBElementCommands.m in Sources */,
1135
1198
  7109C05F2565B5F8006BFD13 /* HTTPMessage.m in Sources */,
1136
1199
  714CA7022566475200353B27 /* XCUIApplication+AMSource.m in Sources */,
@@ -1192,6 +1255,7 @@
1192
1255
  7180C21D257AC27F008FA870 /* AMW3CActionsTests.m in Sources */,
1193
1256
  71B8B684267265D7009CE50C /* AMVariousElementTests.m in Sources */,
1194
1257
  718D2C292567E6D0005F533B /* AMSessionTests.m in Sources */,
1258
+ 71440CE02D54D8C90048EA32 /* AMVideoRecordingTests.m in Sources */,
1195
1259
  );
1196
1260
  runOnlyForDeploymentPostprocessing = 0;
1197
1261
  };