webdriver 8.38.0 → 8.39.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/build/command.js +2 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +9 -4
- package/package.json +5 -5
package/build/command.js
CHANGED
|
@@ -87,7 +87,7 @@ export default function (method, endpointUri, commandInfo, doubleEncodeVariables
|
|
|
87
87
|
}
|
|
88
88
|
const request = await RequestFactory.getInstance(method, endpoint, body, isHubCommand);
|
|
89
89
|
request.on('performance', (...args) => this.emit('request.performance', ...args));
|
|
90
|
-
this.emit('command', { method, endpoint, body });
|
|
90
|
+
this.emit('command', { command, method, endpoint, body });
|
|
91
91
|
log.info('COMMAND', commandCallStructure(command, args));
|
|
92
92
|
/**
|
|
93
93
|
* use then here so we can better unit test what happens before and after the request
|
|
@@ -103,7 +103,7 @@ export default function (method, endpointUri, commandInfo, doubleEncodeVariables
|
|
|
103
103
|
}
|
|
104
104
|
log.info('RESULT', resultLog);
|
|
105
105
|
}
|
|
106
|
-
this.emit('result', { method, endpoint, body, result });
|
|
106
|
+
this.emit('result', { command, method, endpoint, body, result });
|
|
107
107
|
if (command === 'deleteSession') {
|
|
108
108
|
const shutdownDriver = body.deleteSessionOpts?.shutdownDriver !== false;
|
|
109
109
|
/**
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAyB,YAAY,EAAE,kBAAkB,EAAsD,MAAM,YAAY,CAAA;AACxI,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAgB,MAAM,YAAY,CAAA;AAIrE,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;IAqElB;;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;IA+CT;;;;;;OAMG;WACU,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,WAAW,CAAC,YAAY;IAmCvF,MAAM,KAAK,SAAS,qBAEnB;CACJ;AAED;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAA;AAC9D,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import logger from '@wdio/logger';
|
|
2
2
|
import { webdriverMonad, sessionEnvironmentDetector, startWebDriver } from '@wdio/utils';
|
|
3
3
|
import { validateConfig } from '@wdio/config';
|
|
4
|
-
import { deepmerge } from 'deepmerge-ts';
|
|
5
4
|
import command from './command.js';
|
|
6
5
|
import { DEFAULTS } from './constants.js';
|
|
7
6
|
import { startWebDriverSession, getPrototype, getEnvironmentVars, setupDirectConnect, initiateBidi, parseBidiMessage } from './utils.js';
|
|
@@ -114,10 +113,16 @@ export default class WebDriver {
|
|
|
114
113
|
* @returns {string} the new session id of the browser
|
|
115
114
|
*/
|
|
116
115
|
static async reloadSession(instance, newCapabilities) {
|
|
117
|
-
const capabilities =
|
|
118
|
-
|
|
116
|
+
const capabilities = newCapabilities ? newCapabilities : instance.requestedCapabilities;
|
|
117
|
+
let params = { ...instance.options, capabilities };
|
|
118
|
+
for (const prop of ['protocol', 'hostname', 'port', 'path', 'queryParams', 'user', 'key']) {
|
|
119
|
+
if (prop in capabilities) {
|
|
120
|
+
params = { ...params, [prop]: capabilities[prop] };
|
|
121
|
+
delete capabilities[prop];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
119
124
|
let driverProcess;
|
|
120
|
-
if (newCapabilities?.browserName) {
|
|
125
|
+
if (params.hostname === DEFAULTS.hostname.default && newCapabilities?.browserName) {
|
|
121
126
|
delete params.port;
|
|
122
127
|
delete params.hostname;
|
|
123
128
|
driverProcess = await startWebDriver(params);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webdriver",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.39.0",
|
|
4
4
|
"description": "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@types/node": "^20.1.0",
|
|
40
40
|
"@types/ws": "^8.5.3",
|
|
41
|
-
"@wdio/config": "8.
|
|
41
|
+
"@wdio/config": "8.39.0",
|
|
42
42
|
"@wdio/logger": "8.38.0",
|
|
43
43
|
"@wdio/protocols": "8.38.0",
|
|
44
|
-
"@wdio/types": "8.
|
|
45
|
-
"@wdio/utils": "8.
|
|
44
|
+
"@wdio/types": "8.39.0",
|
|
45
|
+
"@wdio/utils": "8.39.0",
|
|
46
46
|
"deepmerge-ts": "^5.1.0",
|
|
47
47
|
"got": "^12.6.1",
|
|
48
48
|
"ky": "^0.33.0",
|
|
49
49
|
"ws": "^8.8.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "82da6a28fabaf5f5fad29ea6dc976091027955f8"
|
|
52
52
|
}
|