appium-webdriveragent 8.5.2 → 8.5.4
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/CHANGELOG.md +14 -0
- package/WebDriverAgentLib/Commands/FBElementCommands.m +0 -8
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentTests/IntegrationApp/Classes/AppDelegate.h +2 -1
- package/WebDriverAgentTests/IntegrationApp/Classes/FBAlertViewController.h +1 -0
- package/WebDriverAgentTests/IntegrationApp/Classes/FBAlertViewController.m +8 -1
- package/WebDriverAgentTests/IntegrationApp/Classes/ViewController.m +7 -1
- package/WebDriverAgentTests/IntegrationApp/Info.plist +3 -3
- package/WebDriverAgentTests/IntegrationTests/FBElementAttributeTests.m +3 -8
- package/WebDriverAgentTests/IntegrationTests/FBElementVisibilityTests.m +0 -5
- package/WebDriverAgentTests/IntegrationTests/XCUIElementFBFindTests.m +15 -45
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [8.5.4](https://github.com/appium/WebDriverAgent/compare/v8.5.3...v8.5.4) (2024-04-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* remove old iOS/Xcode related test code and errors ([#890](https://github.com/appium/WebDriverAgent/issues/890)) ([2fd0dea](https://github.com/appium/WebDriverAgent/commit/2fd0dead0c86d6be08e040360dec9ea085ba0392))
|
|
7
|
+
|
|
8
|
+
## [8.5.3](https://github.com/appium/WebDriverAgent/compare/v8.5.2...v8.5.3) (2024-04-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Miscellaneous Chores
|
|
12
|
+
|
|
13
|
+
* update integerationapp for newer OS env ([#891](https://github.com/appium/WebDriverAgent/issues/891)) ([2c78348](https://github.com/appium/WebDriverAgent/commit/2c7834842afeb1aec77e953ce11ac3c43c839431))
|
|
14
|
+
|
|
1
15
|
## [8.5.2](https://github.com/appium/WebDriverAgent/compare/v8.5.1...v8.5.2) (2024-04-09)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -352,10 +352,6 @@
|
|
|
352
352
|
{
|
|
353
353
|
FBElementCache *elementCache = request.session.elementCache;
|
|
354
354
|
XCUIElement *element = [self targetFromRequest:request];
|
|
355
|
-
if (![element respondsToSelector:@selector(pressForDuration:thenDragToElement:withVelocity:thenHoldForDuration:)]) {
|
|
356
|
-
return FBResponseWithStatus([FBCommandStatus unsupportedOperationErrorWithMessage:@"This method is only supported in Xcode 12 and above"
|
|
357
|
-
traceback:nil]);
|
|
358
|
-
}
|
|
359
355
|
[element pressForDuration:[request.arguments[@"pressDuration"] doubleValue]
|
|
360
356
|
thenDragToElement:[elementCache elementForUUID:(NSString *)request.arguments[@"toElement"]]
|
|
361
357
|
withVelocity:[request.arguments[@"velocity"] doubleValue]
|
|
@@ -370,10 +366,6 @@
|
|
|
370
366
|
(CGFloat)[request.arguments[@"fromY"] doubleValue]);
|
|
371
367
|
XCUICoordinate *startCoordinate = [self.class gestureCoordinateWithOffset:startOffset
|
|
372
368
|
element:session.activeApplication];
|
|
373
|
-
if (![startCoordinate respondsToSelector:@selector(pressForDuration:thenDragToCoordinate:withVelocity:thenHoldForDuration:)]) {
|
|
374
|
-
return FBResponseWithStatus([FBCommandStatus unsupportedOperationErrorWithMessage:@"This method is only supported in Xcode 12 and above"
|
|
375
|
-
traceback:nil]);
|
|
376
|
-
}
|
|
377
369
|
CGVector endOffset = CGVectorMake((CGFloat)[request.arguments[@"toX"] doubleValue],
|
|
378
370
|
(CGFloat)[request.arguments[@"toY"] doubleValue]);
|
|
379
371
|
XCUICoordinate *endCoordinate = [self.class gestureCoordinateWithOffset:endOffset
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<key>CFBundlePackageType</key>
|
|
16
16
|
<string>FMWK</string>
|
|
17
17
|
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>8.5.
|
|
18
|
+
<string>8.5.4</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>8.5.
|
|
22
|
+
<string>8.5.4</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
#import <UIKit/UIKit.h>
|
|
11
|
+
#import <UserNotifications/UserNotifications.h>
|
|
11
12
|
|
|
12
|
-
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
|
13
|
+
@interface AppDelegate : UIResponder <UIApplicationDelegate,UNUserNotificationCenterDelegate>
|
|
13
14
|
@property (strong, nonatomic) UIWindow *window;
|
|
14
15
|
|
|
15
16
|
@end
|
|
@@ -37,7 +37,14 @@
|
|
|
37
37
|
|
|
38
38
|
- (IBAction)createNotificationAlert:(UIButton *)sender
|
|
39
39
|
{
|
|
40
|
-
|
|
40
|
+
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
|
|
41
|
+
[center requestAuthorizationWithOptions:(UNAuthorizationOptionSound|UNAuthorizationOptionAlert|UNAuthorizationOptionBadge)
|
|
42
|
+
completionHandler:^(BOOL granted, NSError * _Nullable error)
|
|
43
|
+
{
|
|
44
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
45
|
+
[[UIApplication sharedApplication] registerForRemoteNotifications];
|
|
46
|
+
});
|
|
47
|
+
}];
|
|
41
48
|
}
|
|
42
49
|
|
|
43
50
|
- (IBAction)createCameraRollAccessAlert:(UIButton *)sender
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
- (void)updateOrentationLabel
|
|
38
38
|
{
|
|
39
39
|
NSString *orientation = nil;
|
|
40
|
-
switch (
|
|
40
|
+
switch (UIDevice.currentDevice.orientation) {
|
|
41
41
|
case UIInterfaceOrientationPortrait:
|
|
42
42
|
orientation = @"Portrait";
|
|
43
43
|
break;
|
|
@@ -50,6 +50,12 @@
|
|
|
50
50
|
case UIInterfaceOrientationLandscapeRight:
|
|
51
51
|
orientation = @"LandscapeRight";
|
|
52
52
|
break;
|
|
53
|
+
case UIDeviceOrientationFaceUp:
|
|
54
|
+
orientation = @"FaceUp";
|
|
55
|
+
break;
|
|
56
|
+
case UIDeviceOrientationFaceDown:
|
|
57
|
+
orientation = @"FaceDown";
|
|
58
|
+
break;
|
|
53
59
|
case UIInterfaceOrientationUnknown:
|
|
54
60
|
orientation = @"Unknown";
|
|
55
61
|
break;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<key>CFBundleExecutable</key>
|
|
8
8
|
<string>$(EXECUTABLE_NAME)</string>
|
|
9
9
|
<key>CFBundleIdentifier</key>
|
|
10
|
-
<string
|
|
10
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
11
11
|
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
12
|
<string>6.0</string>
|
|
13
13
|
<key>CFBundleName</key>
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
<string>1</string>
|
|
23
23
|
<key>LSRequiresIPhoneOS</key>
|
|
24
24
|
<true/>
|
|
25
|
+
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
|
26
|
+
<string>Yo Yo</string>
|
|
25
27
|
<key>NSLocationAlwaysUsageDescription</key>
|
|
26
28
|
<string>Yo Yo</string>
|
|
27
29
|
<key>NSLocationWhenInUseUsageDescription</key>
|
|
28
30
|
<string>Yo Yo</string>
|
|
29
|
-
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
|
30
|
-
<string>Yo Yo</string>
|
|
31
31
|
<key>NSPhotoLibraryUsageDescription</key>
|
|
32
32
|
<string>Yo Yo</string>
|
|
33
33
|
<key>UILaunchStoryboardName</key>
|
|
@@ -48,14 +48,9 @@
|
|
|
48
48
|
XCUIElement *inaccessibleButtonElement = self.testedApplication.buttons[@"not_accessible"];
|
|
49
49
|
XCTAssertTrue(inaccessibleButtonElement.exists);
|
|
50
50
|
XCTAssertFalse(inaccessibleButtonElement.fb_isAccessibilityElement);
|
|
51
|
-
if
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
XCTAssertFalse(inaccessibleButtonElement.isWDAccessibilityContainer);
|
|
55
|
-
} else {
|
|
56
|
-
// Xcode 10 and the below works fine
|
|
57
|
-
XCTAssertTrue(inaccessibleButtonElement.isWDAccessibilityContainer);
|
|
58
|
-
}
|
|
51
|
+
// FIXME: Xcode 11 environment returns false even if iOS 12
|
|
52
|
+
// We must fix here to XCTAssertTrue if Xcode version will return the value properly
|
|
53
|
+
XCTAssertFalse(inaccessibleButtonElement.isWDAccessibilityContainer);
|
|
59
54
|
}
|
|
60
55
|
|
|
61
56
|
- (void)testIgnoredAccessibilityAttributes
|
|
@@ -63,11 +63,6 @@
|
|
|
63
63
|
|
|
64
64
|
- (void)testTableViewCells
|
|
65
65
|
{
|
|
66
|
-
if (SYSTEM_VERSION_GREATER_THAN(@"12.0")) {
|
|
67
|
-
// The test is flacky on iOS 12+ in Travis env
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
66
|
[self launchApplication];
|
|
72
67
|
[self goToScrollPageWithCells:YES];
|
|
73
68
|
for (int i = 0 ; i < 10 ; i++) {
|
|
@@ -71,10 +71,7 @@
|
|
|
71
71
|
{
|
|
72
72
|
NSArray<XCUIElement *> *matchingSnapshots = [self.testedView fb_descendantsMatchingIdentifier:@"Alerts"
|
|
73
73
|
shouldReturnAfterFirstMatch:NO];
|
|
74
|
-
int snapshotsCount =
|
|
75
|
-
if (@available(iOS 13.0, *)) {
|
|
76
|
-
snapshotsCount = 2;
|
|
77
|
-
}
|
|
74
|
+
int snapshotsCount = 2;
|
|
78
75
|
XCTAssertEqual(matchingSnapshots.count, snapshotsCount);
|
|
79
76
|
XCTAssertEqual(matchingSnapshots.firstObject.elementType, XCUIElementTypeButton);
|
|
80
77
|
XCTAssertEqualObjects(matchingSnapshots.lastObject.label, @"Alerts");
|
|
@@ -162,10 +159,7 @@
|
|
|
162
159
|
{
|
|
163
160
|
NSArray<XCUIElement *> *matchingSnapshots = [self.testedView fb_descendantsMatchingXPathQuery:@"//*[@label='Scrolling']/preceding::*[boolean(string(@label))]"
|
|
164
161
|
shouldReturnAfterFirstMatch:NO];
|
|
165
|
-
int snapshotsCount =
|
|
166
|
-
if (@available(iOS 13.0, *)) {
|
|
167
|
-
snapshotsCount = 6;
|
|
168
|
-
}
|
|
162
|
+
int snapshotsCount = 6;
|
|
169
163
|
XCTAssertEqual(matchingSnapshots.count, snapshotsCount);
|
|
170
164
|
}
|
|
171
165
|
|
|
@@ -198,10 +192,7 @@
|
|
|
198
192
|
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"label = 'Alerts'"];
|
|
199
193
|
NSArray<XCUIElement *> *matchingSnapshots = [self.testedView fb_descendantsMatchingPredicate:predicate
|
|
200
194
|
shouldReturnAfterFirstMatch:NO];
|
|
201
|
-
int snapshotsCount =
|
|
202
|
-
if (@available(iOS 13.0, *)) {
|
|
203
|
-
snapshotsCount = 2;
|
|
204
|
-
}
|
|
195
|
+
int snapshotsCount = 2;
|
|
205
196
|
XCTAssertEqual(matchingSnapshots.count, snapshotsCount);
|
|
206
197
|
XCTAssertEqual(matchingSnapshots.firstObject.elementType, XCUIElementTypeButton);
|
|
207
198
|
XCTAssertEqualObjects(matchingSnapshots.lastObject.label, @"Alerts");
|
|
@@ -243,10 +234,7 @@
|
|
|
243
234
|
partialSearch:NO];
|
|
244
235
|
XCTAssertEqual(matchingSnapshots.count, 0);
|
|
245
236
|
matchingSnapshots = [self.testedView fb_descendantsMatchingProperty:@"label" value:@"Alerts" partialSearch:NO];
|
|
246
|
-
int snapshotsCount =
|
|
247
|
-
if (@available(iOS 13.0, *)) {
|
|
248
|
-
snapshotsCount = 2;
|
|
249
|
-
}
|
|
237
|
+
int snapshotsCount = 2;
|
|
250
238
|
XCTAssertEqual(matchingSnapshots.count, snapshotsCount);
|
|
251
239
|
XCTAssertEqual(matchingSnapshots.firstObject.elementType, XCUIElementTypeButton);
|
|
252
240
|
XCTAssertEqualObjects(matchingSnapshots.lastObject.label, @"Alerts");
|
|
@@ -259,10 +247,7 @@
|
|
|
259
247
|
partialSearch:NO];
|
|
260
248
|
XCTAssertEqual(matchingSnapshots.count, 0);
|
|
261
249
|
matchingSnapshots = [self.testedApplication fb_descendantsMatchingProperty:@"label" value:@"Alerts" partialSearch:NO];
|
|
262
|
-
int snapshotsCount =
|
|
263
|
-
if (@available(iOS 13.0, *)) {
|
|
264
|
-
snapshotsCount = 2;
|
|
265
|
-
}
|
|
250
|
+
int snapshotsCount = 2;
|
|
266
251
|
XCTAssertEqual(matchingSnapshots.count, snapshotsCount);
|
|
267
252
|
XCTAssertEqual(matchingSnapshots.firstObject.elementType, XCUIElementTypeButton);
|
|
268
253
|
XCTAssertEqualObjects(matchingSnapshots.lastObject.label, @"Alerts");
|
|
@@ -273,10 +258,7 @@
|
|
|
273
258
|
NSArray<XCUIElement *> *matchingSnapshots = [self.testedView fb_descendantsMatchingProperty:@"label"
|
|
274
259
|
value:@"Alerts"
|
|
275
260
|
partialSearch:NO];
|
|
276
|
-
int snapshotsCount =
|
|
277
|
-
if (@available(iOS 13.0, *)) {
|
|
278
|
-
snapshotsCount = 2;
|
|
279
|
-
}
|
|
261
|
+
int snapshotsCount = 2;
|
|
280
262
|
XCTAssertEqual(matchingSnapshots.count, snapshotsCount);
|
|
281
263
|
XCTAssertEqual(matchingSnapshots.firstObject.elementType, XCUIElementTypeButton);
|
|
282
264
|
XCTAssertEqualObjects(matchingSnapshots.lastObject.label, @"Alerts");
|
|
@@ -297,19 +279,13 @@
|
|
|
297
279
|
- (void)testDescendantsWithClassChainWithIndex
|
|
298
280
|
{
|
|
299
281
|
NSArray<XCUIElement *> *matchingSnapshots;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
// iPad
|
|
308
|
-
queryString = @"XCUIElementTypeWindow/*/*/*/*/*[2]/*/*/XCUIElementTypeButton";
|
|
309
|
-
matchingSnapshots = [self.testedApplication fb_descendantsMatchingClassChain:queryString
|
|
310
|
-
shouldReturnAfterFirstMatch:NO];
|
|
311
|
-
}
|
|
312
|
-
} else {
|
|
282
|
+
// iPhone
|
|
283
|
+
NSString *queryString = @"XCUIElementTypeWindow/*/*/*/*[2]/*/*/XCUIElementTypeButton";
|
|
284
|
+
matchingSnapshots = [self.testedApplication fb_descendantsMatchingClassChain:queryString
|
|
285
|
+
shouldReturnAfterFirstMatch:NO];
|
|
286
|
+
if (matchingSnapshots.count == 0) {
|
|
287
|
+
// iPad
|
|
288
|
+
queryString = @"XCUIElementTypeWindow/*/*/*/*/*[2]/*/*/XCUIElementTypeButton";
|
|
313
289
|
matchingSnapshots = [self.testedApplication fb_descendantsMatchingClassChain:queryString
|
|
314
290
|
shouldReturnAfterFirstMatch:NO];
|
|
315
291
|
}
|
|
@@ -444,10 +420,7 @@
|
|
|
444
420
|
|
|
445
421
|
- (void)testNestedQueryWithClassChain
|
|
446
422
|
{
|
|
447
|
-
NSString *queryString = @"
|
|
448
|
-
if (@available(iOS 13.0, *)) {
|
|
449
|
-
queryString = @"XCUIElementTypePicker";
|
|
450
|
-
}
|
|
423
|
+
NSString *queryString = @"XCUIElementTypePicker";
|
|
451
424
|
FBAssertWaitTillBecomesTrue(self.testedApplication.buttons[@"Button"].fb_isVisible);
|
|
452
425
|
XCUIElement *datePicker = [self.testedApplication
|
|
453
426
|
descendantsMatchingType:XCUIElementTypeDatePicker].allElementsBoundByIndex.firstObject;
|
|
@@ -455,10 +428,7 @@
|
|
|
455
428
|
shouldReturnAfterFirstMatch:NO];
|
|
456
429
|
XCTAssertEqual(matches.count, 1);
|
|
457
430
|
|
|
458
|
-
XCUIElementType expectedType =
|
|
459
|
-
if (@available(iOS 13.0, *)) {
|
|
460
|
-
expectedType = XCUIElementTypePicker;
|
|
461
|
-
}
|
|
431
|
+
XCUIElementType expectedType = XCUIElementTypePicker;
|
|
462
432
|
XCTAssertEqual([matches firstObject].elementType, expectedType);
|
|
463
433
|
}
|
|
464
434
|
|