appium-webdriveragent 5.15.9 → 6.0.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/CHANGELOG.md +10 -2
- package/PrivateHeaders/XCTest/XCUIApplication.h +0 -1
- package/WebDriverAgent.xcodeproj/project.pbxproj +6 -18
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.h +38 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +148 -5
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.m +1 -1
- package/WebDriverAgentLib/Categories/XCUIDevice+FBRotation.h +0 -1
- package/WebDriverAgentLib/Categories/XCUIDevice+FBRotation.m +5 -3
- package/WebDriverAgentLib/Categories/XCUIElement+FBSwiping.h +14 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBSwiping.m +27 -10
- package/WebDriverAgentLib/Categories/XCUIElement+FBTVFocuse.m +2 -2
- package/WebDriverAgentLib/Commands/FBAlertViewCommands.m +4 -4
- package/WebDriverAgentLib/Commands/FBCustomCommands.m +2 -2
- package/WebDriverAgentLib/Commands/FBDebugCommands.m +2 -3
- package/WebDriverAgentLib/Commands/FBElementCommands.m +113 -89
- package/WebDriverAgentLib/Commands/FBFindElementCommands.m +0 -1
- package/WebDriverAgentLib/Commands/FBOrientationCommands.m +9 -8
- package/WebDriverAgentLib/Commands/FBSessionCommands.m +7 -9
- package/WebDriverAgentLib/Commands/FBTouchActionCommands.m +0 -1
- package/WebDriverAgentLib/FBAlert.m +3 -3
- package/WebDriverAgentLib/Routing/FBSession.h +13 -14
- package/WebDriverAgentLib/Routing/FBSession.m +49 -46
- package/WebDriverAgentLib/Utilities/FBAlertsMonitor.m +3 -3
- package/WebDriverAgentLib/Utilities/FBKeyboard.m +6 -5
- package/WebDriverAgentLib/Utilities/FBMjpegServer.m +0 -1
- package/WebDriverAgentLib/Utilities/FBPasteboard.m +2 -2
- package/WebDriverAgentLib/Utilities/FBScreen.m +1 -2
- package/WebDriverAgentLib/Utilities/FBTVNavigationTracker.m +1 -2
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.h +0 -33
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.m +2 -40
- package/WebDriverAgentLib/WebDriverAgentLib.h +0 -1
- package/WebDriverAgentTests/IntegrationTests/FBAutoAlertsHandlerTests.m +2 -3
- package/WebDriverAgentTests/IntegrationTests/FBElementVisibilityTests.m +0 -1
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.h +1 -3
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.m +5 -5
- package/WebDriverAgentTests/IntegrationTests/FBSafariAlertTests.m +1 -2
- package/WebDriverAgentTests/IntegrationTests/FBSessionIntegrationTests.m +11 -10
- package/WebDriverAgentTests/IntegrationTests/FBTapTest.m +0 -1
- package/WebDriverAgentTests/IntegrationTests/FBW3CMultiTouchActionsIntegrationTests.m +0 -1
- package/WebDriverAgentTests/IntegrationTests/XCUIApplicationHelperTests.m +8 -8
- package/WebDriverAgentTests/IntegrationTests/XCUIDeviceHelperTests.m +5 -4
- package/WebDriverAgentTests/IntegrationTests/XCUIElementHelperIntegrationTests.m +0 -1
- package/WebDriverAgentTests/UnitTests/Doubles/{FBApplicationDouble.h → XCUIApplicationDouble.h} +1 -1
- package/WebDriverAgentTests/UnitTests/Doubles/{FBApplicationDouble.m → XCUIApplicationDouble.m} +3 -3
- package/WebDriverAgentTests/UnitTests/FBSessionTests.m +3 -3
- package/package.json +1 -1
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazu.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/kazu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -1342
- package/WebDriverAgentLib/FBApplication.h +0 -49
- package/WebDriverAgentLib/FBApplication.m +0 -185
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
#import <mach/mach_time.h>
|
|
13
13
|
|
|
14
|
-
#import "FBApplication.h"
|
|
15
14
|
#import "FBIntegrationTestCase.h"
|
|
16
15
|
#import "FBElement.h"
|
|
17
16
|
#import "FBMacros.h"
|
|
18
17
|
#import "FBTestMacros.h"
|
|
18
|
+
#import "XCUIApplication.h"
|
|
19
19
|
#import "XCUIApplication+FBHelpers.h"
|
|
20
20
|
#import "XCUIElement+FBIsVisible.h"
|
|
21
21
|
#import "FBXCodeCompatibility.h"
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
- (void)testQueringSpringboard
|
|
35
35
|
{
|
|
36
36
|
[self goToSpringBoardFirstPage];
|
|
37
|
-
XCTAssertTrue(
|
|
38
|
-
XCTAssertTrue(
|
|
37
|
+
XCTAssertTrue(XCUIApplication.fb_systemApplication.icons[@"Safari"].exists);
|
|
38
|
+
XCTAssertTrue(XCUIApplication.fb_systemApplication.icons[@"Calendar"].firstMatch.exists);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
- (void)testApplicationTree
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
|
|
59
59
|
- (void)testActiveApplication
|
|
60
60
|
{
|
|
61
|
-
|
|
62
|
-
XCTAssertTrue([
|
|
61
|
+
XCUIApplication *systemApp = XCUIApplication.fb_systemApplication;
|
|
62
|
+
XCTAssertTrue([XCUIApplication fb_activeApplication].buttons[@"Alerts"].fb_isVisible);
|
|
63
63
|
[self goToSpringBoardFirstPage];
|
|
64
|
-
XCTAssertEqualObjects([
|
|
64
|
+
XCTAssertEqualObjects([XCUIApplication fb_activeApplication].bundleID, systemApp.bundleID);
|
|
65
65
|
XCTAssertTrue(systemApp.icons[@"Safari"].fb_isVisible);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -102,14 +102,14 @@
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
NSError *error;
|
|
105
|
-
NSArray *auditIssues1 = [
|
|
105
|
+
NSArray *auditIssues1 = [XCUIApplication.fb_activeApplication fb_performAccessibilityAuditWithAuditTypes:~0UL
|
|
106
106
|
error:&error];
|
|
107
107
|
XCTAssertNotNil(auditIssues1);
|
|
108
108
|
XCTAssertNil(error);
|
|
109
109
|
|
|
110
110
|
NSMutableSet *set = [NSMutableSet new];
|
|
111
111
|
[set addObject:@"XCUIAccessibilityAuditTypeAll"];
|
|
112
|
-
NSArray *auditIssues2 = [
|
|
112
|
+
NSArray *auditIssues2 = [XCUIApplication.fb_activeApplication fb_performAccessibilityAuditWithAuditTypesSet:set.copy
|
|
113
113
|
error:&error];
|
|
114
114
|
XCTAssertEqualObjects(auditIssues1, auditIssues2);
|
|
115
115
|
XCTAssertNil(error);
|
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
#import <XCTest/XCTest.h>
|
|
11
11
|
|
|
12
|
-
#import "FBApplication.h"
|
|
13
12
|
#import "FBIntegrationTestCase.h"
|
|
14
13
|
#import "FBImageUtils.h"
|
|
15
14
|
#import "FBMacros.h"
|
|
16
15
|
#import "FBTestMacros.h"
|
|
16
|
+
#import "XCUIApplication.h"
|
|
17
|
+
#import "XCUIApplication+FBHelpers.h"
|
|
17
18
|
#import "XCUIDevice+FBHelpers.h"
|
|
18
19
|
#import "XCUIDevice+FBRotation.h"
|
|
19
20
|
#import "XCUIScreen.h"
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
NSError *error;
|
|
102
103
|
XCTAssertTrue([[XCUIDevice sharedDevice] fb_goToHomescreenWithError:&error]);
|
|
103
104
|
XCTAssertNil(error);
|
|
104
|
-
XCTAssertTrue([
|
|
105
|
+
XCTAssertTrue([XCUIApplication fb_activeApplication].icons[@"Safari"].exists);
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
- (void)testLockUnlockScreen
|
|
@@ -124,7 +125,7 @@
|
|
|
124
125
|
|
|
125
126
|
NSError *error;
|
|
126
127
|
XCTAssertTrue([XCUIDevice.sharedDevice fb_openUrl:@"https://apple.com" error:&error]);
|
|
127
|
-
FBAssertWaitTillBecomesTrue([
|
|
128
|
+
FBAssertWaitTillBecomesTrue([XCUIApplication.fb_activeApplication.bundleID isEqualToString:@"com.apple.mobilesafari"]);
|
|
128
129
|
XCTAssertNil(error);
|
|
129
130
|
}
|
|
130
131
|
|
|
@@ -138,7 +139,7 @@
|
|
|
138
139
|
XCTAssertTrue([XCUIDevice.sharedDevice fb_openUrl:@"https://apple.com"
|
|
139
140
|
withApplication:@"com.apple.mobilesafari"
|
|
140
141
|
error:&error]);
|
|
141
|
-
FBAssertWaitTillBecomesTrue([
|
|
142
|
+
FBAssertWaitTillBecomesTrue([XCUIApplication.fb_activeApplication.bundleID isEqualToString:@"com.apple.mobilesafari"]);
|
|
142
143
|
XCTAssertNil(error);
|
|
143
144
|
}
|
|
144
145
|
|
package/WebDriverAgentTests/UnitTests/Doubles/{FBApplicationDouble.h → XCUIApplicationDouble.h}
RENAMED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
#import <Foundation/Foundation.h>
|
|
11
11
|
|
|
12
|
-
@interface
|
|
12
|
+
@interface XCUIApplicationDouble : NSObject
|
|
13
13
|
@property (nonatomic, assign, readonly) BOOL didTerminate;
|
|
14
14
|
@property (nonatomic, strong) NSString* bundleID;
|
|
15
15
|
@property (nonatomic) BOOL fb_shouldWaitForQuiescence;
|
package/WebDriverAgentTests/UnitTests/Doubles/{FBApplicationDouble.m → XCUIApplicationDouble.m}
RENAMED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#import "
|
|
10
|
+
#import "XCUIApplicationDouble.h"
|
|
11
11
|
|
|
12
|
-
@interface
|
|
12
|
+
@interface XCUIApplicationDouble ()
|
|
13
13
|
@property (nonatomic, assign, readwrite) BOOL didTerminate;
|
|
14
14
|
@end
|
|
15
15
|
|
|
16
|
-
@implementation
|
|
16
|
+
@implementation XCUIApplicationDouble
|
|
17
17
|
|
|
18
18
|
- (instancetype)init
|
|
19
19
|
{
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
#import <XCTest/XCTest.h>
|
|
11
11
|
|
|
12
|
-
#import "FBApplicationDouble.h"
|
|
13
12
|
#import "FBSession.h"
|
|
14
13
|
#import "FBConfiguration.h"
|
|
14
|
+
#import "XCUIApplicationDouble.h"
|
|
15
15
|
|
|
16
16
|
@interface FBSessionTests : XCTestCase
|
|
17
17
|
@property (nonatomic, strong) FBSession *session;
|
|
18
|
-
@property (nonatomic, strong)
|
|
18
|
+
@property (nonatomic, strong) XCUIApplication *testedApplication;
|
|
19
19
|
@property (nonatomic) BOOL shouldTerminateAppValue;
|
|
20
20
|
@end
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
- (void)setUp
|
|
25
25
|
{
|
|
26
26
|
[super setUp];
|
|
27
|
-
self.testedApplication = (id)
|
|
27
|
+
self.testedApplication = (id)XCUIApplicationDouble.new;
|
|
28
28
|
self.shouldTerminateAppValue = FBConfiguration.shouldTerminateApp;
|
|
29
29
|
[FBConfiguration setShouldTerminateApp:NO];
|
|
30
30
|
self.session = [FBSession initWithApplication:self.testedApplication];
|
package/package.json
CHANGED