Skip to content

Commit 9a94385

Browse files
refactor: remove deprecated WDA settings/capabilities and idb typing
1 parent 0924871 commit 9a94385

13 files changed

Lines changed: 3 additions & 98 deletions

File tree

WebDriverAgentLib/Commands/FBSessionCommands.m

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ + (NSArray *)routes
101101
}
102102

103103
[FBConfiguration resetSessionSettings];
104-
[FBConfiguration setShouldUseTestManagerForVisibilityDetection:[capabilities[FB_CAP_USE_TEST_MANAGER_FOR_VISIBLITY_DETECTION] boolValue]];
105104
if (capabilities[FB_SETTING_USE_COMPACT_RESPONSES]) {
106105
[FBConfiguration setShouldUseCompactResponses:[capabilities[FB_SETTING_USE_COMPACT_RESPONSES] boolValue]];
107106
}
@@ -345,7 +344,6 @@ + (NSArray *)routes
345344
FB_SETTING_REDUCE_MOTION: @([FBConfiguration reduceMotionEnabled]),
346345
FB_SETTING_DEFAULT_ACTIVE_APPLICATION: request.session.defaultActiveApplication,
347346
FB_SETTING_ACTIVE_APP_DETECTION_POINT: FBActiveAppDetectionPoint.sharedInstance.stringCoordinates,
348-
FB_SETTING_INCLUDE_NON_MODAL_ELEMENTS: @([FBConfiguration includeNonModalElements]),
349347
FB_SETTING_ACCEPT_ALERT_BUTTON_SELECTOR: FBConfiguration.acceptAlertButtonSelector,
350348
FB_SETTING_DISMISS_ALERT_BUTTON_SELECTOR: FBConfiguration.dismissAlertButtonSelector,
351349
FB_SETTING_AUTO_CLICK_ALERT_SELECTOR: FBConfiguration.autoClickAlertSelector,
@@ -428,13 +426,6 @@ + (NSArray *)routes
428426
traceback:nil]);
429427
}
430428
}
431-
if (nil != [settings objectForKey:FB_SETTING_INCLUDE_NON_MODAL_ELEMENTS]) {
432-
if ([XCUIElement fb_supportsNonModalElementsInclusion]) {
433-
[FBConfiguration setIncludeNonModalElements:[[settings objectForKey:FB_SETTING_INCLUDE_NON_MODAL_ELEMENTS] boolValue]];
434-
} else {
435-
[FBLogger logFmt:@"'%@' settings value cannot be assigned, because non modal elements inclusion is not supported by the current iOS SDK", FB_SETTING_INCLUDE_NON_MODAL_ELEMENTS];
436-
}
437-
}
438429
if (nil != [settings objectForKey:FB_SETTING_ACCEPT_ALERT_BUTTON_SELECTOR]) {
439430
[FBConfiguration setAcceptAlertButtonSelector:(NSString *)[settings objectForKey:FB_SETTING_ACCEPT_ALERT_BUTTON_SELECTOR]];
440431
}

WebDriverAgentLib/Utilities/FBCapabilities.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
#import <Foundation/Foundation.h>
1010

11-
/** Whether to use alternative elements visivility detection method */
12-
extern NSString* const FB_CAP_USE_TEST_MANAGER_FOR_VISIBLITY_DETECTION;
1311
/** Set the maximum amount of characters that could be typed within a minute (60 by default) */
1412
extern NSString* const FB_CAP_MAX_TYPING_FREQUENCY;
1513
/** this setting was needed for some legacy stuff */

WebDriverAgentLib/Utilities/FBCapabilities.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#import "FBCapabilities.h"
1010

11-
NSString* const FB_CAP_USE_TEST_MANAGER_FOR_VISIBLITY_DETECTION = @"shouldUseTestManagerForVisibilityDetection";
1211
NSString* const FB_CAP_MAX_TYPING_FREQUENCY = @"maxTypingFrequency";
1312
NSString* const FB_CAP_USE_SINGLETON_TEST_MANAGER = @"shouldUseSingletonTestManager";
1413
NSString* const FB_CAP_DISABLE_AUTOMATIC_SCREENSHOTS = @"disableAutomaticScreenshots";

WebDriverAgentLib/Utilities/FBConfiguration.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ extern NSString *const FBSnapshotMaxDepthKey;
1818
*/
1919
@interface FBConfiguration : NSObject
2020

21-
/*! If set to YES will ask TestManagerDaemon for element visibility */
22-
+ (void)setShouldUseTestManagerForVisibilityDetection:(BOOL)value;
23-
+ (BOOL)shouldUseTestManagerForVisibilityDetection;
24-
2521
/*! If set to YES will use compact (standards-compliant) & faster responses */
2622
+ (void)setShouldUseCompactResponses:(BOOL)value;
2723
+ (BOOL)shouldUseCompactResponses;
@@ -276,17 +272,6 @@ typedef NS_ENUM(NSInteger, FBConfigurationKeyboardPreference) {
276272
+ (void)setAnimationCoolOffTimeout:(NSTimeInterval)timeout;
277273
+ (NSTimeInterval)animationCoolOffTimeout;
278274

279-
/**
280-
Enforces the page hierarchy to include non modal elements,
281-
like Contacts. By default such elements are not present there.
282-
See https://github.com/appium/appium/issues/13227
283-
284-
@param isEnabled Set to YES in order to enable non modal elements inclusion.
285-
Setting this value to YES will have no effect if the current iOS SDK does not support such feature.
286-
*/
287-
+ (void)setIncludeNonModalElements:(BOOL)isEnabled;
288-
+ (BOOL)includeNonModalElements;
289-
290275
/**
291276
Sets custom class chain locators for accept/dismiss alert buttons location.
292277
This might be useful if the default buttons detection algorithm fails to determine alert buttons properly

WebDriverAgentLib/Utilities/FBConfiguration.m

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
static NSString *const FBKeyboardPredictionKey = @"KeyboardPrediction";
3434
static NSString *const axSettingsClassName = @"AXSettings";
3535

36-
static BOOL FBShouldUseTestManagerForVisibilityDetection = NO;
3736
static BOOL FBShouldUseSingletonTestManager = YES;
3837
static BOOL FBShouldRespectSystemAlerts = NO;
3938

@@ -48,7 +47,6 @@
4847
static NSUInteger FBScreenshotQuality;
4948
static BOOL FBShouldUseFirstMatch;
5049
static BOOL FBShouldBoundElementsByIndex;
51-
static BOOL FBIncludeNonModalElements;
5250
static NSString *FBAcceptAlertButtonSelector;
5351
static NSString *FBDismissAlertButtonSelector;
5452
static NSString *FBAutoClickAlertSelector;
@@ -188,16 +186,6 @@ + (BOOL)verboseLoggingEnabled
188186
return [NSProcessInfo.processInfo.environment[@"VERBOSE_LOGGING"] boolValue];
189187
}
190188

191-
+ (void)setShouldUseTestManagerForVisibilityDetection:(BOOL)value
192-
{
193-
FBShouldUseTestManagerForVisibilityDetection = value;
194-
}
195-
196-
+ (BOOL)shouldUseTestManagerForVisibilityDetection
197-
{
198-
return FBShouldUseTestManagerForVisibilityDetection;
199-
}
200-
201189
+ (void)setShouldUseCompactResponses:(BOOL)value
202190
{
203191
FBShouldUseCompactResponses = value;
@@ -426,16 +414,6 @@ + (BOOL)boundElementsByIndex
426414
return FBShouldBoundElementsByIndex;
427415
}
428416

429-
+ (void)setIncludeNonModalElements:(BOOL)isEnabled
430-
{
431-
FBIncludeNonModalElements = isEnabled;
432-
}
433-
434-
+ (BOOL)includeNonModalElements
435-
{
436-
return FBIncludeNonModalElements;
437-
}
438-
439417
+ (void)setAcceptAlertButtonSelector:(NSString *)classChainSelector
440418
{
441419
FBAcceptAlertButtonSelector = classChainSelector;
@@ -542,9 +520,6 @@ + (void)resetSessionSettings
542520
FBScreenshotQuality = 3;
543521
FBShouldUseFirstMatch = NO;
544522
FBShouldBoundElementsByIndex = NO;
545-
// This is diabled by default because enabling it prevents the accessbility snapshot to be taken
546-
// (it always errors with kxIllegalArgument error)
547-
FBIncludeNonModalElements = NO;
548523
FBAcceptAlertButtonSelector = @"";
549524
FBDismissAlertButtonSelector = @"";
550525
FBAutoClickAlertSelector = @"";

WebDriverAgentLib/Utilities/FBSettings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ extern NSString* const FB_SETTING_BOUND_ELEMENTS_BY_INDEX;
2828
extern NSString* const FB_SETTING_REDUCE_MOTION;
2929
extern NSString* const FB_SETTING_DEFAULT_ACTIVE_APPLICATION;
3030
extern NSString* const FB_SETTING_ACTIVE_APP_DETECTION_POINT;
31-
extern NSString* const FB_SETTING_INCLUDE_NON_MODAL_ELEMENTS;
3231
extern NSString* const FB_SETTING_DEFAULT_ALERT_ACTION;
3332
extern NSString* const FB_SETTING_ACCEPT_ALERT_BUTTON_SELECTOR;
3433
extern NSString* const FB_SETTING_DISMISS_ALERT_BUTTON_SELECTOR;

WebDriverAgentLib/Utilities/FBSettings.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
NSString* const FB_SETTING_REDUCE_MOTION = @"reduceMotion";
2525
NSString* const FB_SETTING_DEFAULT_ACTIVE_APPLICATION = @"defaultActiveApplication";
2626
NSString* const FB_SETTING_ACTIVE_APP_DETECTION_POINT = @"activeAppDetectionPoint";
27-
NSString* const FB_SETTING_INCLUDE_NON_MODAL_ELEMENTS = @"includeNonModalElements";
2827
NSString* const FB_SETTING_DEFAULT_ALERT_ACTION = @"defaultAlertAction";
2928
NSString* const FB_SETTING_ACCEPT_ALERT_BUTTON_SELECTOR = @"acceptAlertButtonSelector";
3029
NSString* const FB_SETTING_DISMISS_ALERT_BUTTON_SELECTOR = @"dismissAlertButtonSelector";

WebDriverAgentLib/Utilities/FBXCodeCompatibility.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,10 @@ NS_ASSUME_NONNULL_BEGIN
6161

6262
@interface XCUIElement (FBCompatibility)
6363

64-
/**
65-
Determines whether current iOS SDK supports non modal elements inlusion into snapshots
66-
67-
@return Either YES or NO
68-
*/
69-
+ (BOOL)fb_supportsNonModalElementsInclusion;
70-
7164
/**
7265
Retrieves element query
7366
74-
@return Element query property extended with non modal elements depending on the actual configuration
67+
@return Element query
7568
*/
7669
- (XCUIElementQuery *)fb_query;
7770

WebDriverAgentLib/Utilities/FBXCodeCompatibility.m

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,9 @@ - (XCUIElement *)fb_firstMatch
4545

4646
@implementation XCUIElement (FBCompatibility)
4747

48-
+ (BOOL)fb_supportsNonModalElementsInclusion
49-
{
50-
static dispatch_once_t hasIncludingNonModalElements;
51-
static BOOL result;
52-
dispatch_once(&hasIncludingNonModalElements, ^{
53-
result = [XCUIApplication.fb_systemApplication.query respondsToSelector:@selector(includingNonModalElements)];
54-
});
55-
return result;
56-
}
57-
5848
- (XCUIElementQuery *)fb_query
5949
{
60-
return FBConfiguration.includeNonModalElements && self.class.fb_supportsNonModalElementsInclusion
61-
? self.query.includingNonModalElements
62-
: self.query;
50+
return self.query;
6351
}
6452

6553
@end

WebDriverAgentLib/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7104,23 +7104,6 @@ - (void)ssl_startTLS
71047104
return;
71057105
}
71067106

7107-
#if !TARGET_OS_IPHONE && (__MAC_OS_X_VERSION_MIN_REQUIRED < 1080)
7108-
7109-
// Note from Apple's documentation:
7110-
//
7111-
// It is only necessary to call SSLSetEnableCertVerify on the Mac prior to OS X 10.8.
7112-
// On OS X 10.8 and later setting kSSLSessionOptionBreakOnServerAuth always disables the
7113-
// built-in trust evaluation. All versions of iOS behave like OS X 10.8 and thus
7114-
// SSLSetEnableCertVerify is not available on that platform at all.
7115-
7116-
status = SSLSetEnableCertVerify(sslContext, NO);
7117-
if (status != noErr)
7118-
{
7119-
[self closeWithError:[self otherError:@"Error in SSLSetEnableCertVerify"]];
7120-
return;
7121-
}
7122-
7123-
#endif
71247107
}
71257108

71267109
// Configure SSLContext from given settings

0 commit comments

Comments
 (0)