appium-webdriveragent 6.0.0 → 6.1.1
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
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [6.1.1](https://github.com/appium/WebDriverAgent/compare/v6.1.0...v6.1.1) (2024-02-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* Make sure the app under test is restarted if opened from a deep link ([#846](https://github.com/appium/WebDriverAgent/issues/846)) ([88b0a5b](https://github.com/appium/WebDriverAgent/commit/88b0a5b0f8aefa05a7dc28d17faf62c229e0706f))
|
|
7
|
+
|
|
8
|
+
## [6.1.0](https://github.com/appium/WebDriverAgent/compare/v6.0.0...v6.1.0) (2024-02-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Add a possibility of starting a test with a deep link ([#845](https://github.com/appium/WebDriverAgent/issues/845)) ([aa25e49](https://github.com/appium/WebDriverAgent/commit/aa25e49fa9821960b08e9f4f3ea5891ebdf7d48d))
|
|
14
|
+
|
|
1
15
|
## [6.0.0](https://github.com/appium/WebDriverAgent/compare/v5.15.8...v6.0.0) (2024-01-31)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -136,6 +136,7 @@
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
NSString *bundleID = capabilities[FB_CAP_BUNDLE_ID];
|
|
139
|
+
NSString *initialUrl = capabilities[FB_CAP_INITIAL_URL];
|
|
139
140
|
XCUIApplication *app = nil;
|
|
140
141
|
if (bundleID != nil) {
|
|
141
142
|
app = [[XCUIApplication alloc] initWithBundleIdentifier:bundleID];
|
|
@@ -150,14 +151,48 @@
|
|
|
150
151
|
|| [capabilities[FB_CAP_SHOULD_WAIT_FOR_QUIESCENCE] boolValue];
|
|
151
152
|
app.launchArguments = (NSArray<NSString *> *)capabilities[FB_CAP_ARGUMENTS] ?: @[];
|
|
152
153
|
app.launchEnvironment = (NSDictionary <NSString *, NSString *> *)capabilities[FB_CAP_ENVIRNOMENT] ?: @{};
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
if (nil != initialUrl) {
|
|
155
|
+
if (app.running) {
|
|
156
|
+
[app terminate];
|
|
157
|
+
}
|
|
158
|
+
NSError *openError;
|
|
159
|
+
if (![XCUIDevice.sharedDevice fb_openUrl:initialUrl
|
|
160
|
+
withApplication:bundleID
|
|
161
|
+
error:&openError]) {
|
|
162
|
+
NSString *errorMsg = [NSString stringWithFormat:@"Cannot open the URL %@ wuth the %@ application. Original error: %@",
|
|
163
|
+
initialUrl, bundleID, openError.description];
|
|
164
|
+
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:errorMsg traceback:nil]);
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
[app launch];
|
|
168
|
+
}
|
|
169
|
+
if (!app.running) {
|
|
155
170
|
NSString *errorMsg = [NSString stringWithFormat:@"Cannot launch %@ application. Make sure the correct bundle identifier has been provided in capabilities and check the device log for possible crash report occurrences", bundleID];
|
|
156
171
|
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:errorMsg
|
|
157
172
|
traceback:nil]);
|
|
158
173
|
}
|
|
159
174
|
} else if (appState == XCUIApplicationStateRunningBackground && !forceAppLaunch) {
|
|
160
|
-
|
|
175
|
+
if (nil != initialUrl) {
|
|
176
|
+
NSError *openError;
|
|
177
|
+
if (![XCUIDevice.sharedDevice fb_openUrl:initialUrl
|
|
178
|
+
withApplication:bundleID
|
|
179
|
+
error:&openError]) {
|
|
180
|
+
NSString *errorMsg = [NSString stringWithFormat:@"Cannot open the URL %@ with the %@ application. Original error: %@",
|
|
181
|
+
initialUrl, bundleID, openError.description];
|
|
182
|
+
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:errorMsg traceback:nil]);
|
|
183
|
+
}
|
|
184
|
+
} else {
|
|
185
|
+
[app activate];
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (nil != initialUrl && nil == bundleID) {
|
|
191
|
+
NSError *openError;
|
|
192
|
+
if (![XCUIDevice.sharedDevice fb_openUrl:initialUrl error:&openError]) {
|
|
193
|
+
NSString *errorMsg = [NSString stringWithFormat:@"Cannot open the URL %@. Original error: %@",
|
|
194
|
+
initialUrl, openError.description];
|
|
195
|
+
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:errorMsg traceback:nil]);
|
|
161
196
|
}
|
|
162
197
|
}
|
|
163
198
|
|
|
@@ -9,16 +9,36 @@
|
|
|
9
9
|
|
|
10
10
|
#import <Foundation/Foundation.h>
|
|
11
11
|
|
|
12
|
+
/** Whether to use alternative elements visivility detection method */
|
|
12
13
|
extern NSString* const FB_CAP_USE_TEST_MANAGER_FOR_VISIBLITY_DETECTION;
|
|
14
|
+
/** Set the maximum amount of charatcers that could be typed within a minute (60 by default) */
|
|
13
15
|
extern NSString* const FB_CAP_MAX_TYPING_FREQUENCY;
|
|
16
|
+
/** this setting was needed for some legacy stuff */
|
|
14
17
|
extern NSString* const FB_CAP_USE_SINGLETON_TEST_MANAGER;
|
|
18
|
+
/** Whether to disable screneshots that XCTest automaticallly creates after each step */
|
|
15
19
|
extern NSString* const FB_CAP_DISABLE_AUTOMATIC_SCREENSHOTS;
|
|
20
|
+
/** Whether to terminate the application under test after the session ends */
|
|
16
21
|
extern NSString* const FB_CAP_SHOULD_TERMINATE_APP;
|
|
22
|
+
/** The maximum amount of seconds to wait for the event loop to become idle */
|
|
17
23
|
extern NSString* const FB_CAP_EVENT_LOOP_IDLE_DELAY_SEC;
|
|
24
|
+
/** Bundle identifier of the application to run the test for */
|
|
18
25
|
extern NSString* const FB_CAP_BUNDLE_ID;
|
|
26
|
+
/**
|
|
27
|
+
Usually an URL used as initial link to run Mobile Safari, but could be any other deep link.
|
|
28
|
+
This might also work together with `FB_CAP_BUNLDE_ID`, which tells XCTest to open
|
|
29
|
+
the given deep link in the particular app.
|
|
30
|
+
Only works since iOS 16.4
|
|
31
|
+
*/
|
|
32
|
+
extern NSString* const FB_CAP_INITIAL_URL;
|
|
33
|
+
/** Whether to enforrce (re)start of the application under test on session startup */
|
|
19
34
|
extern NSString* const FB_CAP_FORCE_APP_LAUNCH;
|
|
35
|
+
/** Whether to wait for quiescence before starting interaction with apps laucnhes in scope of the test session */
|
|
20
36
|
extern NSString* const FB_CAP_SHOULD_WAIT_FOR_QUIESCENCE;
|
|
37
|
+
/** Array of command line arguments to be passed to the application under test */
|
|
21
38
|
extern NSString* const FB_CAP_ARGUMENTS;
|
|
39
|
+
/** Dictionary of environment variables to be passed to the application under test */
|
|
22
40
|
extern NSString* const FB_CAP_ENVIRNOMENT;
|
|
41
|
+
/** Whether to use native XCTest caching strategy */
|
|
23
42
|
extern NSString* const FB_CAP_USE_NATIVE_CACHING_STRATEGY;
|
|
43
|
+
/** Whether to enforce software keyboard presence on simulator */
|
|
24
44
|
extern NSString* const FB_CAP_FORCE_SIMULATOR_SOFTWARE_KEYBOARD_PRESENCE;
|
|
@@ -16,6 +16,7 @@ NSString* const FB_CAP_DISABLE_AUTOMATIC_SCREENSHOTS = @"disableAutomaticScreens
|
|
|
16
16
|
NSString* const FB_CAP_SHOULD_TERMINATE_APP = @"shouldTerminateApp";
|
|
17
17
|
NSString* const FB_CAP_EVENT_LOOP_IDLE_DELAY_SEC = @"eventloopIdleDelaySec";
|
|
18
18
|
NSString* const FB_CAP_BUNDLE_ID = @"bundleId";
|
|
19
|
+
NSString* const FB_CAP_INITIAL_URL = @"initialUrl";
|
|
19
20
|
NSString* const FB_CAP_FORCE_APP_LAUNCH = @"forceAppLaunch";
|
|
20
21
|
NSString* const FB_CAP_SHOULD_WAIT_FOR_QUIESCENCE = @"shouldWaitForQuiescence";
|
|
21
22
|
NSString* const FB_CAP_ARGUMENTS = @"arguments";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-webdriveragent",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "Package bundling WebDriverAgent",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
"dev": "npm run build -- --watch",
|
|
9
9
|
"clean": "npm run build -- --clean",
|
|
10
10
|
"lint": "eslint .",
|
|
11
|
+
"format": "prettier -w ./lib",
|
|
11
12
|
"lint:fix": "npm run lint -- --fix",
|
|
12
|
-
"precommit-msg": "echo 'Pre-commit checks...' && exit 0",
|
|
13
|
-
"precommit-lint": "lint-staged",
|
|
14
13
|
"prepare": "npm run build",
|
|
15
14
|
"test": "mocha --exit --timeout 1m \"./test/unit/**/*-specs.js\"",
|
|
16
15
|
"e2e-test": "mocha --exit --timeout 10m \"./test/functional/**/*-specs.js\"",
|
|
@@ -23,20 +22,11 @@
|
|
|
23
22
|
"node": ">=14",
|
|
24
23
|
"npm": ">=8"
|
|
25
24
|
},
|
|
26
|
-
"lint-staged": {
|
|
27
|
-
"*.js": [
|
|
28
|
-
"eslint --fix"
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
25
|
"prettier": {
|
|
32
26
|
"bracketSpacing": false,
|
|
33
27
|
"printWidth": 100,
|
|
34
28
|
"singleQuote": true
|
|
35
29
|
},
|
|
36
|
-
"pre-commit": [
|
|
37
|
-
"precommit-msg",
|
|
38
|
-
"precommit-lint"
|
|
39
|
-
],
|
|
40
30
|
"repository": {
|
|
41
31
|
"type": "git",
|
|
42
32
|
"url": "git+https://github.com/appium/WebDriverAgent.git"
|
|
@@ -83,9 +73,7 @@
|
|
|
83
73
|
"eslint-plugin-import": "^2.28.0",
|
|
84
74
|
"eslint-plugin-mocha": "^10.1.0",
|
|
85
75
|
"eslint-plugin-promise": "^6.1.1",
|
|
86
|
-
"lint-staged": "^15.0.2",
|
|
87
76
|
"mocha": "^10.0.0",
|
|
88
|
-
"pre-commit": "^1.2.2",
|
|
89
77
|
"prettier": "^3.0.0",
|
|
90
78
|
"semantic-release": "^23.0.0",
|
|
91
79
|
"sinon": "^17.0.0",
|