@applitools/spec-driver-webdriver 1.1.0 → 1.1.3

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,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.3](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-webdriver@1.1.2...js/spec-driver-webdriver@1.1.3) (2024-03-18)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * @applitools/driver bumped to 1.16.5
9
+ #### Bug Fixes
10
+
11
+ * trigger js release again ([1695f3d](https://github.com/Applitools-Dev/sdk/commit/1695f3d9967c7ab7b5d8c8637e86faa935a9047f))
12
+
13
+ ## [1.1.2](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-webdriver@1.1.1...js/spec-driver-webdriver@1.1.2) (2024-03-18)
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * @applitools/driver bumped to 1.16.4
19
+ #### Bug Fixes
20
+
21
+ * trigger js release ([dbc9bf8](https://github.com/Applitools-Dev/sdk/commit/dbc9bf8da3ab5d93e570881ba2c61efa47a1b342))
22
+
23
+ ## [1.1.1](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-webdriver@1.1.0...js/spec-driver-webdriver@1.1.1) (2024-03-17)
24
+
25
+
26
+ ### Dependencies
27
+
28
+ * @applitools/driver bumped to 1.16.3
29
+ #### Bug Fixes
30
+
31
+ * skip execution of getCurrentWorld and getWorlds when env var is set ([#2234](https://github.com/Applitools-Dev/sdk/issues/2234)) ([3a88602](https://github.com/Applitools-Dev/sdk/commit/3a886028b0437b73dae0474408d9bb74ba940dec))
32
+ * trigger build ([acb9c88](https://github.com/Applitools-Dev/sdk/commit/acb9c88161cf55e8b1e409425b5571d69a2e1d5c))
33
+
3
34
  ## [1.1.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/spec-driver-webdriver@1.0.57...js/spec-driver-webdriver@1.1.0) (2024-02-18)
4
35
 
5
36
 
@@ -252,7 +252,13 @@ function toSimpleCommonSelector(selector) {
252
252
  exports.toSimpleCommonSelector = toSimpleCommonSelector;
253
253
  async function executeScript(driver, script, arg) {
254
254
  script = utils.types.isFunction(script) ? `return (${script}).apply(null, arguments)` : script;
255
- return driver.executeScript(script, [arg]);
255
+ // temporary solution for webdriver package not throwing on stale elements starting from Chrome 122
256
+ // https://github.com/webdriverio/webdriverio/blob/5df72f58475c4f580c57d5b805588c204c44c2af/packages/webdriver/src/request/index.ts#L258
257
+ const result = await driver.executeScript(script, [arg]);
258
+ if (result === null || result === void 0 ? void 0 : result.error) {
259
+ throw new Error(result.error);
260
+ }
261
+ return result;
256
262
  }
257
263
  exports.executeScript = executeScript;
258
264
  async function findElement(driver, selector, parent) {
@@ -336,11 +342,7 @@ async function getDriverInfo(driver) {
336
342
  }
337
343
  exports.getDriverInfo = getDriverInfo;
338
344
  async function getCapabilities(driver) {
339
- var _a;
340
- const capabilities = utils.general.getEnvValue('SKIP_DEPRECATED_JWP_COMMANDS', 'boolean')
341
- ? null
342
- : await ((_a = driver.getSession) === null || _a === void 0 ? void 0 : _a.call(driver).catch(() => null));
343
- return utils.types.isObject(capabilities) ? capabilities : driver.capabilities;
345
+ return driver.capabilities;
344
346
  }
345
347
  exports.getCapabilities = getCapabilities;
346
348
  async function getWindowSize(driver) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/spec-driver-webdriver",
3
- "version": "1.1.0",
3
+ "version": "1.1.3",
4
4
  "keywords": [
5
5
  "webdriver",
6
6
  "chrome devtools protocol",
@@ -49,7 +49,7 @@
49
49
  "up:framework": "echo \"$(jq '.devDependencies.webdriver = $ENV.APPLITOOLS_FRAMEWORK_VERSION' ./package.json)\" > ./package.json"
50
50
  },
51
51
  "dependencies": {
52
- "@applitools/driver": "1.16.2",
52
+ "@applitools/driver": "1.16.5",
53
53
  "@applitools/utils": "1.7.0",
54
54
  "http-proxy-agent": "5.0.0",
55
55
  "https-proxy-agent": "5.0.1"