appium-webdriveragent 3.9.2 → 3.12.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/.DS_Store +0 -0
- package/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h +3 -0
- package/README.md +0 -1
- package/WebDriverAgent.xcodeproj/project.pbxproj +56 -56
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/elf.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/elf.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +51 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/{kazuaki.xcuserdatad → elf.xcuserdatad}/xcschemes/xcschememanagement.plist +23 -8
- package/WebDriverAgentLib/.DS_Store +0 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.h +0 -17
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +0 -16
- package/WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m +28 -14
- package/WebDriverAgentLib/Categories/XCUIElement+FBResolve.h +37 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBResolve.m +51 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBUtilities.m +8 -2
- package/WebDriverAgentLib/Commands/FBElementCommands.m +3 -1
- package/WebDriverAgentLib/Commands/FBOrientationCommands.m +20 -9
- package/WebDriverAgentLib/Commands/FBSessionCommands.m +119 -99
- package/WebDriverAgentLib/FBApplication.m +1 -1
- package/WebDriverAgentLib/Routing/FBElementCache.m +42 -11
- package/WebDriverAgentLib/Routing/FBResponsePayload.m +9 -3
- package/WebDriverAgentLib/Routing/FBSession.h +6 -0
- package/WebDriverAgentLib/Routing/FBSession.m +45 -55
- package/WebDriverAgentLib/Utilities/FBAlertsMonitor.h +1 -3
- package/WebDriverAgentLib/Utilities/FBAlertsMonitor.m +6 -13
- package/WebDriverAgentLib/Utilities/FBCapabilities.h +23 -0
- package/WebDriverAgentLib/Utilities/FBCapabilities.m +23 -0
- package/WebDriverAgentLib/Utilities/FBConfiguration.m +6 -1
- package/WebDriverAgentLib/Utilities/FBScreenshot.m +125 -14
- package/WebDriverAgentLib/Utilities/FBSettings.h +23 -23
- package/WebDriverAgentLib/Utilities/FBSettings.m +23 -23
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.h +16 -0
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.m +16 -0
- package/WebDriverAgentLib/Utilities/FBXPath.m +15 -44
- package/WebDriverAgentLib/Utilities/LRUCache/.DS_Store +0 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCache.h +59 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCache.m +104 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCacheNode.h +43 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCacheNode.m +59 -0
- package/WebDriverAgentLib/Vendor/.DS_Store +0 -0
- package/WebDriverAgentRunner/.DS_Store +0 -0
- package/WebDriverAgentRunner-Runner.app.zip +0 -0
- package/WebDriverAgentTests/IntegrationApp/Resources/.DS_Store +0 -0
- package/WebDriverAgentTests/IntegrationTests/FBSessionIntegrationTests.m +20 -16
- package/WebDriverAgentTests/IntegrationTests/XCUIApplicationHelperTests.m +2 -1
- package/WebDriverAgentTests/IntegrationTests/XCUIElementFBFindTests.m +11 -0
- package/WebDriverAgentTests/UnitTests/Doubles/FBApplicationDouble.h +3 -0
- package/WebDriverAgentTests/UnitTests/Doubles/FBApplicationDouble.m +15 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.h +1 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.m +1 -0
- package/WebDriverAgentTests/UnitTests/FBSessionTests.m +11 -1
- package/WebDriverAgentTests/UnitTests/FBXPathTests.m +3 -1
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.h +1 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.m +1 -0
- package/package.json +3 -3
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazuaki.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazuaki.xcuserdatad/WorkspaceSettings.xcsettings +0 -20
- package/WebDriverAgent.xcodeproj/xcuserdata/kazuaki.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -906
- package/WebDriverAgentLib/Vendor/YYCache/YYCache.h +0 -206
- package/WebDriverAgentLib/Vendor/YYCache/YYCache.m +0 -140
- package/WebDriverAgentLib/Vendor/YYCache/YYDiskCache.h +0 -412
- package/WebDriverAgentLib/Vendor/YYCache/YYDiskCache.m +0 -462
- package/WebDriverAgentLib/Vendor/YYCache/YYKVStorage.h +0 -325
- package/WebDriverAgentLib/Vendor/YYCache/YYKVStorage.m +0 -1068
- package/WebDriverAgentLib/Vendor/YYCache/YYMemoryCache.h +0 -213
- package/WebDriverAgentLib/Vendor/YYCache/YYMemoryCache.m +0 -508
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
#import "XCElementSnapshot+FBHelpers.h"
|
|
19
19
|
#import "XCUIElement+FBIsVisible.h"
|
|
20
20
|
#import "XCUIElement+FBClassChain.h"
|
|
21
|
+
#import "XCUIElement+FBResolve.h"
|
|
21
22
|
#import "FBXPath.h"
|
|
22
23
|
#import "FBXCodeCompatibility.h"
|
|
23
24
|
|
|
@@ -86,6 +87,16 @@
|
|
|
86
87
|
XCTAssertEqualObjects(matchingSnapshots.lastObject.label, @"Alerts");
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
- (void)testStableInstance
|
|
91
|
+
{
|
|
92
|
+
NSArray<XCUIElement *> *matchingSnapshots = [self.testedView fb_descendantsMatchingIdentifier:@"Alerts" shouldReturnAfterFirstMatch:YES];
|
|
93
|
+
XCTAssertEqual(matchingSnapshots.count, 1);
|
|
94
|
+
for (XCUIElement *el in @[matchingSnapshots.lastObject, matchingSnapshots.lastObject.fb_stableInstance]) {
|
|
95
|
+
XCTAssertEqual(el.elementType, XCUIElementTypeButton);
|
|
96
|
+
XCTAssertEqualObjects(el.label, @"Alerts");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
89
100
|
- (void)testSingleDescendantWithMissingIdentifier
|
|
90
101
|
{
|
|
91
102
|
NSArray<XCUIElement *> *matchingSnapshots = [self.testedView fb_descendantsMatchingIdentifier:@"blabla" shouldReturnAfterFirstMatch:YES];
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
@interface XCUIElementDouble : NSObject<FBElement>
|
|
17
17
|
@property (nonatomic, strong, nonnull) XCUIApplication *application;
|
|
18
18
|
@property (nonatomic, readwrite, assign) CGRect frame;
|
|
19
|
+
@property (nonatomic, readwrite, nullable) id lastSnapshot;
|
|
19
20
|
@property (nonatomic, assign) BOOL fb_isObstructedByAlert;
|
|
20
21
|
@property (nonatomic, readonly, nonnull) NSString *fb_cacheId;
|
|
21
22
|
@property (nonatomic, nullable) NSNumber *fb_isResolvedFromCache;
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
|
|
12
12
|
#import "FBApplicationDouble.h"
|
|
13
13
|
#import "FBSession.h"
|
|
14
|
+
#import "FBConfiguration.h"
|
|
14
15
|
|
|
15
16
|
@interface FBSessionTests : XCTestCase
|
|
16
17
|
@property (nonatomic, strong) FBSession *session;
|
|
17
18
|
@property (nonatomic, strong) FBApplication *testedApplication;
|
|
19
|
+
@property (nonatomic) BOOL shouldTerminateAppValue;
|
|
18
20
|
@end
|
|
19
21
|
|
|
20
22
|
@implementation FBSessionTests
|
|
@@ -23,9 +25,18 @@
|
|
|
23
25
|
{
|
|
24
26
|
[super setUp];
|
|
25
27
|
self.testedApplication = (id)FBApplicationDouble.new;
|
|
28
|
+
self.shouldTerminateAppValue = FBConfiguration.shouldTerminateApp;
|
|
29
|
+
[FBConfiguration setShouldTerminateApp:NO];
|
|
26
30
|
self.session = [FBSession initWithApplication:self.testedApplication];
|
|
27
31
|
}
|
|
28
32
|
|
|
33
|
+
- (void)tearDown
|
|
34
|
+
{
|
|
35
|
+
[self.session kill];
|
|
36
|
+
[FBConfiguration setShouldTerminateApp:self.shouldTerminateAppValue];
|
|
37
|
+
[super tearDown];
|
|
38
|
+
}
|
|
39
|
+
|
|
29
40
|
- (void)testSessionFetching
|
|
30
41
|
{
|
|
31
42
|
FBSession *fetchedSession = [FBSession sessionWithIdentifier:self.session.identifier];
|
|
@@ -51,7 +62,6 @@
|
|
|
51
62
|
- (void)testActiveSessionIsNilAfterKilling
|
|
52
63
|
{
|
|
53
64
|
[self.session kill];
|
|
54
|
-
XCTAssertTrue(((FBApplicationDouble *)self.testedApplication).didTerminate);
|
|
55
65
|
XCTAssertNil([FBSession activeSession]);
|
|
56
66
|
}
|
|
57
67
|
|
|
@@ -42,7 +42,9 @@
|
|
|
42
42
|
XCTAssertEqual(rc, 0);
|
|
43
43
|
XCTAssertEqual(1, [elementStore count]);
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
NSString *result = [NSString stringWithCString:(const char *)xmlbuff encoding:NSUTF8StringEncoding];
|
|
46
|
+
xmlFree(xmlbuff);
|
|
47
|
+
return result;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
- (void)testDefaultXPathPresentation
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
@interface XCUIElementDouble : NSObject<FBElement>
|
|
17
17
|
@property (nonatomic, strong, nonnull) XCUIApplication *application;
|
|
18
18
|
@property (nonatomic, readwrite, assign) CGRect frame;
|
|
19
|
+
@property (nonatomic, readwrite, nullable) id lastSnapshot;
|
|
19
20
|
@property (nonatomic, assign) BOOL fb_isObstructedByAlert;
|
|
20
21
|
@property (nonatomic, nullable) NSNumber *fb_isResolvedFromCache;
|
|
21
22
|
@property (nonatomic, readwrite, copy, nonnull) NSDictionary *wdRect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-webdriveragent",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"description": "Package bundling WebDriverAgent",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"glob": "^7.1.0",
|
|
53
53
|
"gulp": "^4.0.2",
|
|
54
54
|
"ios-uicatalog": "^3.5.0",
|
|
55
|
-
"mocha": "^
|
|
55
|
+
"mocha": "^9.0.0",
|
|
56
56
|
"pre-commit": "^1.2.2",
|
|
57
|
-
"sinon": "^
|
|
57
|
+
"sinon": "^11.0.0",
|
|
58
58
|
"wd": "^1.11.4"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>BuildLocationStyle</key>
|
|
6
|
-
<string>UseAppPreferences</string>
|
|
7
|
-
<key>CustomBuildLocationType</key>
|
|
8
|
-
<string>RelativeToDerivedData</string>
|
|
9
|
-
<key>DerivedDataLocationStyle</key>
|
|
10
|
-
<string>Default</string>
|
|
11
|
-
<key>EnabledFullIndexStoreVisibility</key>
|
|
12
|
-
<false/>
|
|
13
|
-
<key>IssueFilterStyle</key>
|
|
14
|
-
<string>ShowActiveSchemeOnly</string>
|
|
15
|
-
<key>LiveSourceIssuesEnabled</key>
|
|
16
|
-
<true/>
|
|
17
|
-
<key>ShowSharedSchemesAutomaticallyEnabled</key>
|
|
18
|
-
<true/>
|
|
19
|
-
</dict>
|
|
20
|
-
</plist>
|