@applitools/spec-driver-webdriver 1.6.17 → 1.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.7.0](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-webdriver@1.6.17...js/spec-driver-webdriver@1.7.0) (2026-11-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * stitch iOS full pages without NML from the accessibility tree | AD-16309 ([#4202](https://github.com/Applitools-Dev/sdk/issues/4202)) ([123cbc8](https://github.com/Applitools-Dev/sdk/commit/123cbc85179d3179c5a8400bb3c1b9927561f8d9))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * reloadPage awaits navigation so dom-snapshot can't race the layoutBreakpoints reload | AD-18455 ([#4540](https://github.com/Applitools-Dev/sdk/issues/4540)) ([accf317](https://github.com/Applitools-Dev/sdk/commit/accf317b44e4158c9b64f5f75524aad7450b7002))
14
+ * resolve shadow-root region selectors via the shadow endpoint | AD-18427 ([#4532](https://github.com/Applitools-Dev/sdk/issues/4532)) ([d43f26a](https://github.com/Applitools-Dev/sdk/commit/d43f26a0ca24285f31d7cfca5ea4a11a6f8461eb))
15
+
16
+
17
+ ### Dependencies
18
+
19
+ * @applitools/utils bumped to 1.16.0
20
+ #### Features
21
+
22
+ * stitch iOS full pages without NML from the accessibility tree | AD-16309 ([#4202](https://github.com/Applitools-Dev/sdk/issues/4202)) ([123cbc8](https://github.com/Applitools-Dev/sdk/commit/123cbc85179d3179c5a8400bb3c1b9927561f8d9))
23
+ * @applitools/logger bumped to 2.3.5
24
+
25
+ * @applitools/dom-shared bumped to 1.2.6
26
+ #### Bug Fixes
27
+
28
+ * reloadPage awaits navigation so dom-snapshot can't race the layoutBreakpoints reload | AD-18455 ([#4540](https://github.com/Applitools-Dev/sdk/issues/4540)) ([accf317](https://github.com/Applitools-Dev/sdk/commit/accf317b44e4158c9b64f5f75524aad7450b7002))
29
+ * @applitools/snippets bumped to 2.9.13
30
+
31
+ * @applitools/driver bumped to 1.27.0
32
+ #### Features
33
+
34
+ * stitch iOS full pages without NML from the accessibility tree | AD-16309 ([#4202](https://github.com/Applitools-Dev/sdk/issues/4202)) ([123cbc8](https://github.com/Applitools-Dev/sdk/commit/123cbc85179d3179c5a8400bb3c1b9927561f8d9))
35
+
36
+
37
+ #### Bug Fixes
38
+
39
+ * reloadPage awaits navigation so dom-snapshot can't race the layoutBreakpoints reload | AD-18455 ([#4540](https://github.com/Applitools-Dev/sdk/issues/4540)) ([accf317](https://github.com/Applitools-Dev/sdk/commit/accf317b44e4158c9b64f5f75524aad7450b7002))
40
+
41
+
42
+
43
+ * @applitools/test-server bumped to 1.4.12
44
+
45
+
3
46
  ## [1.6.17](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-webdriver@1.6.16...js/spec-driver-webdriver@1.6.17) (2026-11-18)
4
47
 
5
48
 
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.build = exports.switchWorld = exports.getWorlds = exports.getCurrentWorld = exports.takeScreenshot = exports.performAction = exports.visit = exports.getPageSource = exports.getUrl = exports.getTitle = exports.getCookies = exports.getSystemBars = exports.setOrientation = exports.getOrientation = exports.setViewportSize = exports.setWindowSize = exports.getWindowSize = exports.getCapabilities = exports.getDriverInfo = exports.childContext = exports.parentContext = exports.mainContext = exports.click = exports.hover = exports.getElementText = exports.setElementText = exports.getElementAttribute = exports.getElementRegion = exports.findElements = exports.findElement = exports.executeBrowserCommands = exports.executeScript = exports.toSimpleCommonSelector = exports.toSelector = exports.toElement = exports.toDriver = exports.isStaleElementError = exports.isEqualElements = exports.isSelector = exports.isShadowRoot = exports.isSecondaryElement = exports.isElement = exports.isSecondaryDriver = exports.isDriver = exports.buildWebDriverProxyCapabilities = exports.getProxyConfiguration = void 0;
29
+ exports.build = exports.switchWorld = exports.getWorlds = exports.getCurrentWorld = exports.takeScreenshot = exports.performAction = exports.reload = exports.visit = exports.updateSettings = exports.getSettings = exports.getPageSource = exports.getUrl = exports.getTitle = exports.getCookies = exports.getSystemBars = exports.setOrientation = exports.getOrientation = exports.setViewportSize = exports.setWindowSize = exports.getWindowSize = exports.getCapabilities = exports.getDriverInfo = exports.childContext = exports.parentContext = exports.mainContext = exports.click = exports.hover = exports.getElementText = exports.setElementText = exports.getElementAttribute = exports.getElementRegion = exports.findElements = exports.findElement = exports.executeBrowserCommands = exports.executeScript = exports.toSimpleCommonSelector = exports.toSelector = exports.toElement = exports.toDriver = exports.isStaleElementError = exports.isEqualElements = exports.isSelector = exports.isShadowRoot = exports.isSecondaryElement = exports.isElement = exports.isSecondaryDriver = exports.isDriver = exports.buildWebDriverProxyCapabilities = exports.getProxyConfiguration = void 0;
30
30
  const http_proxy_agent_1 = require("http-proxy-agent");
31
31
  const https_proxy_agent_1 = require("https-proxy-agent");
32
32
  const http_1 = __importDefault(require("http"));
@@ -334,10 +334,12 @@ async function executeBrowserCommands(driver, commands, logger) {
334
334
  }
335
335
  exports.executeBrowserCommands = executeBrowserCommands;
336
336
  async function findElement(driver, selector, parent) {
337
- const parentId = parent ? (isShadowRoot(parent) ? extractShadowRootId(parent) : extractElementId(parent)) : null;
338
337
  try {
339
- const element = parentId
340
- ? await driver.findElementFromElement(parentId, selector.using, selector.value)
338
+ // a shadow-root id must go to /shadow/{id}/element, not /element/{id}/element — ChromeDriver 158+ rejects the latter
339
+ const element = parent
340
+ ? isShadowRoot(parent)
341
+ ? await driver.findElementFromShadowRoot(extractShadowRootId(parent), selector.using, selector.value)
342
+ : await driver.findElementFromElement(extractElementId(parent), selector.using, selector.value)
341
343
  : await driver.findElement(selector.using, selector.value);
342
344
  return isElement(element) ? element : null;
343
345
  }
@@ -352,9 +354,10 @@ async function findElement(driver, selector, parent) {
352
354
  }
353
355
  exports.findElement = findElement;
354
356
  async function findElements(driver, selector, parent) {
355
- const parentId = parent ? (isShadowRoot(parent) ? extractShadowRootId(parent) : extractElementId(parent)) : null;
356
- return parentId
357
- ? await driver.findElementsFromElement(parentId, selector.using, selector.value)
357
+ return parent
358
+ ? isShadowRoot(parent)
359
+ ? (await driver.findElementsFromShadowRoot(extractShadowRootId(parent), selector.using, selector.value))
360
+ : await driver.findElementsFromElement(extractElementId(parent), selector.using, selector.value)
358
361
  : await driver.findElements(selector.using, selector.value);
359
362
  }
360
363
  exports.findElements = findElements;
@@ -507,10 +510,22 @@ async function getPageSource(driver) {
507
510
  return driver.getPageSource();
508
511
  }
509
512
  exports.getPageSource = getPageSource;
513
+ async function getSettings(driver) {
514
+ return driver.getSettings();
515
+ }
516
+ exports.getSettings = getSettings;
517
+ async function updateSettings(driver, settings) {
518
+ await driver.updateSettings(settings);
519
+ }
520
+ exports.updateSettings = updateSettings;
510
521
  async function visit(driver, url) {
511
522
  await driver.navigateTo(url);
512
523
  }
513
524
  exports.visit = visit;
525
+ async function reload(driver) {
526
+ await driver.refresh();
527
+ }
528
+ exports.reload = reload;
514
529
  async function performAction(driver, steps) {
515
530
  return driver.performActions(steps);
516
531
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/spec-driver-webdriver",
3
- "version": "1.6.17",
3
+ "version": "1.7.0",
4
4
  "keywords": [
5
5
  "webdriver",
6
6
  "chrome devtools protocol",
@@ -43,14 +43,14 @@
43
43
  "test:ios-simulator": "MOCHA_ONLY_TAGS=ios-simulator run --top-level mocha ./test/e2e/ios-simulator.spec.ts --exit"
44
44
  },
45
45
  "dependencies": {
46
- "@applitools/driver": "1.26.17",
47
- "@applitools/utils": "1.15.4",
46
+ "@applitools/driver": "1.27.0",
47
+ "@applitools/utils": "1.16.0",
48
48
  "http-proxy-agent": "^7.0.2",
49
49
  "https-proxy-agent": "^7.0.6"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@applitools/api-extractor": "^1.2.22",
53
- "@applitools/test-server": "^1.4.11",
53
+ "@applitools/test-server": "^1.4.12",
54
54
  "@applitools/test-utils": "^1.5.17",
55
55
  "@types/node": "^12.20.55",
56
56
  "@wdio/globals": "^8.14.3",
package/types/index.d.ts CHANGED
@@ -56,7 +56,10 @@ export function getCookies(driver: Driver<unknown>, context?: undefined | boolea
56
56
  export function getTitle(driver: Driver<unknown>): Promise<string>;
57
57
  export function getUrl(driver: Driver<unknown>): Promise<string>;
58
58
  export function getPageSource(driver: Driver<unknown>): Promise<string>;
59
+ export function getSettings(driver: Driver<unknown>): Promise<Record<string, any>>;
60
+ export function updateSettings(driver: Driver<unknown>, settings: Record<string, any>): Promise<void>;
59
61
  export function visit(driver: Driver<unknown>, url: string): Promise<void>;
62
+ export function reload(driver: Driver<unknown>): Promise<void>;
60
63
  export function performAction(driver: Driver<unknown>, steps: Array<import('@applitools/driver').DriverAction>): Promise<void>;
61
64
  export function takeScreenshot(driver: Driver<unknown>): Promise<string>;
62
65
  export function getCurrentWorld(driver: Driver<unknown>): Promise<string>;