webdriver 7.16.13 → 7.16.14
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/build/constants.d.ts.map +1 -1
- package/build/constants.js +4 -11
- package/build/index.d.ts.map +1 -1
- package/build/index.js +12 -17
- package/build/utils.d.ts +8 -1
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +28 -1
- package/package.json +5 -5
package/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CA0IpE,CAAA;AAED,eAAO,MAAM,UAAU,UAItB,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAGpB,CAAA"}
|
package/build/constants.js
CHANGED
|
@@ -124,18 +124,11 @@ exports.DEFAULTS = {
|
|
|
124
124
|
},
|
|
125
125
|
/**
|
|
126
126
|
* Appium direct connect options server (https://appiumpro.com/editions/86-connecting-directly-to-appium-hosts-in-distributed-environments)
|
|
127
|
+
* Whether to allow direct connect caps to adjust endpoint details (Appium only)
|
|
127
128
|
*/
|
|
128
|
-
|
|
129
|
-
type: '
|
|
130
|
-
|
|
131
|
-
directConnectHost: {
|
|
132
|
-
type: 'string'
|
|
133
|
-
},
|
|
134
|
-
directConnectPort: {
|
|
135
|
-
type: 'number'
|
|
136
|
-
},
|
|
137
|
-
directConnectPath: {
|
|
138
|
-
type: 'string'
|
|
129
|
+
enableDirectConnect: {
|
|
130
|
+
type: 'boolean',
|
|
131
|
+
default: true
|
|
139
132
|
},
|
|
140
133
|
/**
|
|
141
134
|
* Whether it requires SSL certificates to be valid in HTTP/s requests
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,aAAa,CAAA;AAExD,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAyB,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,aAAa,CAAA;AAExD,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAyB,YAAY,EAA0C,MAAM,SAAS,CAAA;AACrG,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAgB,MAAM,SAAS,CAAA;AAIlE,MAAM,CAAC,OAAO,OAAO,SAAS;WACb,UAAU,CACnB,OAAO,EAAE,OAAO,CAAC,SAAS,EAC1B,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAClC,aAAa,KAAK,EAClB,oBAAoB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAC/C,OAAO,CAAC,MAAM,CAAC;IA4ClB;;OAEG;IACH,MAAM,CAAC,eAAe,CAClB,OAAO,CAAC,EAAE,aAAa,EACvB,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAClC,aAAa,KAAK,EAClB,cAAc,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GACzC,MAAM;IAwBT;;;;;;MAME;WACW,aAAa,CAAE,QAAQ,EAAE,MAAM;IAW5C,MAAM,KAAK,SAAS,qBAEnB;CACJ;AAED;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;AAC1C,cAAc,SAAS,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -38,22 +38,6 @@ class WebDriver {
|
|
|
38
38
|
process.env.WDIO_LOG_PATH = path_1.default.join(params.outputDir, 'wdio.log');
|
|
39
39
|
}
|
|
40
40
|
log.info('Initiate new session using the WebDriver protocol');
|
|
41
|
-
/**
|
|
42
|
-
* if the server responded with direct connect information, update the
|
|
43
|
-
* params to speak directly to the appium host instead of a load
|
|
44
|
-
* balancer (see https://github.com/appium/python-client#direct-connect-urls
|
|
45
|
-
* for example). But only do this if the user has enabled this
|
|
46
|
-
* behavior in the first place.
|
|
47
|
-
*/
|
|
48
|
-
const { directConnectProtocol, directConnectHost, directConnectPort, directConnectPath } = params;
|
|
49
|
-
if (directConnectProtocol && directConnectHost && directConnectPort && (directConnectPath || directConnectPath === '')) {
|
|
50
|
-
log.info('Found direct connect information in new session response. ' +
|
|
51
|
-
`Will connect to server at ${directConnectProtocol}://${directConnectHost}:${directConnectPort}/${directConnectPath}`);
|
|
52
|
-
params.protocol = directConnectProtocol;
|
|
53
|
-
params.hostname = directConnectHost;
|
|
54
|
-
params.port = directConnectPort;
|
|
55
|
-
params.path = directConnectPath;
|
|
56
|
-
}
|
|
57
41
|
const requestedCapabilities = { ...params.capabilities };
|
|
58
42
|
const { sessionId, capabilities } = await (0, utils_2.startWebDriverSession)(params);
|
|
59
43
|
const environment = (0, utils_1.sessionEnvironmentDetector)({ capabilities, requestedCapabilities });
|
|
@@ -61,7 +45,18 @@ class WebDriver {
|
|
|
61
45
|
const protocolCommands = (0, utils_2.getPrototype)(environment);
|
|
62
46
|
const prototype = { ...protocolCommands, ...environmentPrototype, ...userPrototype };
|
|
63
47
|
const monad = (0, utils_1.webdriverMonad)({ ...params, requestedCapabilities }, modifier, prototype);
|
|
64
|
-
|
|
48
|
+
const client = monad(sessionId, customCommandWrapper);
|
|
49
|
+
/**
|
|
50
|
+
* if the server responded with direct connect information, update the
|
|
51
|
+
* client options to speak directly to the appium host instead of a load
|
|
52
|
+
* balancer (see https://github.com/appium/python-client#direct-connect-urls
|
|
53
|
+
* for example). But only do this if the user has enabled this
|
|
54
|
+
* behavior in the first place.
|
|
55
|
+
*/
|
|
56
|
+
if (params.enableDirectConnect) {
|
|
57
|
+
(0, utils_2.setupDirectConnect)(client);
|
|
58
|
+
}
|
|
59
|
+
return client;
|
|
65
60
|
}
|
|
66
61
|
/**
|
|
67
62
|
* allows user to attach to existing sessions
|
package/build/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Options, Capabilities } from '@wdio/types';
|
|
2
2
|
import { WebDriverResponse } from './request';
|
|
3
|
-
import type { JSONWPCommandError, SessionFlags } from './types';
|
|
3
|
+
import type { Client, JSONWPCommandError, SessionFlags } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* start browser session with WebDriver protocol
|
|
6
6
|
*/
|
|
@@ -60,6 +60,13 @@ export declare function getEnvironmentVars({ isW3C, isMobile, isIOS, isAndroid,
|
|
|
60
60
|
value: boolean | undefined;
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Decorate the client's options object with host updates based on the presence of
|
|
65
|
+
* directConnect capabilities in the new session response. Note that this
|
|
66
|
+
* mutates the object.
|
|
67
|
+
* @param {Client} params post-new-session client
|
|
68
|
+
*/
|
|
69
|
+
export declare function setupDirectConnect(client: Client): void;
|
|
63
70
|
/**
|
|
64
71
|
* get human readable message from response error
|
|
65
72
|
* @param {Error} err response error
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAGnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAGnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAWvE;;GAEG;AACH,wBAAsB,qBAAqB,CAAE,MAAM,EAAE,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,YAAY,CAAC,mBAAmB,CAAA;CAAE,CAAC,CAmEtJ;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAE,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,iBAAiB,WA4DlF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE,OAAO,CAAC,YAAY,CAAC,sCAyC3H;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAE,IAAI,EAAE,GAAG,SAclD;AAGD,qBAAa,kBAAmB,SAAQ,KAAK;gBAC7B,IAAI,EAAE,iBAAiB;CAetC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;EAWlJ;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,QAmBhD;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAS,kBAAkB,WAAU,QAAQ,iBAAiB,CAAC,WAmD1F,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,UAAW,KAAK,kBAAkB,QAAQ,iBAAiB,KAAG,KASzF,CAAA"}
|
package/build/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getTimeoutError = exports.getSessionError = exports.getEnvironmentVars = exports.CustomRequestError = exports.getErrorFromResponseBody = exports.getPrototype = exports.isSuccessfulResponse = exports.startWebDriverSession = void 0;
|
|
6
|
+
exports.getTimeoutError = exports.getSessionError = exports.setupDirectConnect = exports.getEnvironmentVars = exports.CustomRequestError = exports.getErrorFromResponseBody = exports.getPrototype = exports.isSuccessfulResponse = exports.startWebDriverSession = void 0;
|
|
7
7
|
const lodash_merge_1 = __importDefault(require("lodash.merge"));
|
|
8
8
|
const logger_1 = __importDefault(require("@wdio/logger"));
|
|
9
9
|
const protocols_1 = require("@wdio/protocols");
|
|
@@ -236,6 +236,33 @@ function getEnvironmentVars({ isW3C, isMobile, isIOS, isAndroid, isChrome, isFir
|
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
exports.getEnvironmentVars = getEnvironmentVars;
|
|
239
|
+
/**
|
|
240
|
+
* Decorate the client's options object with host updates based on the presence of
|
|
241
|
+
* directConnect capabilities in the new session response. Note that this
|
|
242
|
+
* mutates the object.
|
|
243
|
+
* @param {Client} params post-new-session client
|
|
244
|
+
*/
|
|
245
|
+
function setupDirectConnect(client) {
|
|
246
|
+
const capabilities = client.capabilities;
|
|
247
|
+
const directConnectProtocol = capabilities.directConnectProtocol || capabilities['appium:directConnectProtocol'];
|
|
248
|
+
const directConnectHost = capabilities.directConnectHost || capabilities['appium:directConnectHost'];
|
|
249
|
+
let directConnectPath = capabilities.directConnectPath;
|
|
250
|
+
if (!(directConnectPath || directConnectPath === '')) {
|
|
251
|
+
directConnectPath = capabilities['appium:directConnectPath'];
|
|
252
|
+
}
|
|
253
|
+
const directConnectPort = capabilities.directConnectPort || capabilities['appium:directConnectPort'];
|
|
254
|
+
if (directConnectProtocol && directConnectHost && directConnectPort &&
|
|
255
|
+
(directConnectPath || directConnectPath === '')) {
|
|
256
|
+
log.info('Found direct connect information in new session response. ' +
|
|
257
|
+
`Will connect to server at ${directConnectProtocol}://` +
|
|
258
|
+
`${directConnectHost}:${directConnectPort}${directConnectPath}`);
|
|
259
|
+
client.options.protocol = directConnectProtocol;
|
|
260
|
+
client.options.hostname = directConnectHost;
|
|
261
|
+
client.options.port = directConnectPort;
|
|
262
|
+
client.options.path = directConnectPath;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
exports.setupDirectConnect = setupDirectConnect;
|
|
239
266
|
/**
|
|
240
267
|
* get human readable message from response error
|
|
241
268
|
* @param {Error} err response error
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webdriver",
|
|
3
|
-
"version": "7.16.
|
|
3
|
+
"version": "7.16.14",
|
|
4
4
|
"description": "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@types/node": "^17.0.4",
|
|
29
|
-
"@wdio/config": "7.16.
|
|
29
|
+
"@wdio/config": "7.16.14",
|
|
30
30
|
"@wdio/logger": "7.16.0",
|
|
31
31
|
"@wdio/protocols": "7.16.7",
|
|
32
|
-
"@wdio/types": "7.16.
|
|
33
|
-
"@wdio/utils": "7.16.
|
|
32
|
+
"@wdio/types": "7.16.14",
|
|
33
|
+
"@wdio/utils": "7.16.14",
|
|
34
34
|
"got": "^11.0.2",
|
|
35
35
|
"ky": "^0.28.5",
|
|
36
36
|
"lodash.merge": "^4.6.1"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "be9d252b21fff13f161b8607e186a33a530e3d3d"
|
|
39
39
|
}
|