@applitools/driver 1.19.2 → 1.19.4

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,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.19.4](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.19.3...js/driver@1.19.4) (2024-10-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * better handling of stale elements ([cab10ff](https://github.com/Applitools-Dev/sdk/commit/cab10ff1ae1e6f9560a7d278c710b3fa03f58c83))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/snippets bumped to 2.5.2
14
+ #### Bug Fixes
15
+
16
+ * better handling of stale elements ([cab10ff](https://github.com/Applitools-Dev/sdk/commit/cab10ff1ae1e6f9560a7d278c710b3fa03f58c83))
17
+
18
+ ## [1.19.3](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.19.2...js/driver@1.19.3) (2024-10-21)
19
+
20
+
21
+ ### Dependencies
22
+
23
+ * @applitools/snippets bumped to 2.5.1
24
+ #### Bug Fixes
25
+
26
+ * isStaleElement error ([#2567](https://github.com/Applitools-Dev/sdk/issues/2567)) ([2675086](https://github.com/Applitools-Dev/sdk/commit/2675086aa28589082249e2958942ee29a5f2ef12))
27
+
3
28
  ## [1.19.2](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.19.1...js/driver@1.19.2) (2024-10-03)
4
29
 
5
30
 
package/dist/context.js CHANGED
@@ -309,6 +309,9 @@ class Context {
309
309
  else if ((0, element_1.isElement)(selectorOrElement, this._spec)) {
310
310
  return [await (0, element_1.makeElement)({ spec: this._spec, context: this, element: selectorOrElement })];
311
311
  }
312
+ else if (selectorOrElement === undefined) {
313
+ throw new TypeError('Cannot find undefined elements!');
314
+ }
312
315
  else {
313
316
  throw new TypeError('Cannot find elements using argument of unknown type!');
314
317
  }
package/dist/driver.js CHANGED
@@ -485,7 +485,7 @@ class Driver {
485
485
  do {
486
486
  result = JSON.parse(await this._state.nmlElement.getText());
487
487
  if (result.nextPath) {
488
- this._logger.log('Broker url was extraction finished successfully with value', result.nextPath);
488
+ this._logger.log('Broker url extraction finished successfully with value', result.nextPath);
489
489
  return result.nextPath;
490
490
  }
491
491
  await utils.general.sleep(1000);
@@ -145,13 +145,13 @@ class MockDriver {
145
145
  this.mockScript(snippets.addElementIds, elementsWithIds => {
146
146
  return elementsWithIds.map(([elements, id]) => elements.map(element => {
147
147
  element.attributes = element.attributes || [];
148
- element.attributes.push({ name: 'data-applitools-marker', value: id });
149
- return [`[data-applitools-marker~="${id}"]`]; // no shadow is mocked here
148
+ element.attributes.push({ name: 'data-applitools-selector', value: id });
149
+ return [`[data-applitools-selector~="${id}"]`]; // no shadow is mocked here
150
150
  }));
151
151
  });
152
152
  this.mockScript(snippets.cleanupElementIds, ([elements]) => {
153
153
  for (const el of elements) {
154
- el.attributes.splice(el.attributes.findIndex(({ name }) => name === 'data-applitools-marker'), 1);
154
+ el.attributes.splice(el.attributes.findIndex(({ name }) => name === 'data-applitools-selector'), 1);
155
155
  }
156
156
  });
157
157
  this.mockScript(snippets.getElementContentSize, ([element]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/driver",
3
- "version": "1.19.2",
3
+ "version": "1.19.4",
4
4
  "description": "Applitools universal framework wrapper",
5
5
  "keywords": [
6
6
  "applitools",
@@ -74,7 +74,7 @@
74
74
  },
75
75
  "dependencies": {
76
76
  "@applitools/logger": "2.0.18",
77
- "@applitools/snippets": "2.5.0",
77
+ "@applitools/snippets": "2.5.2",
78
78
  "@applitools/utils": "1.7.4",
79
79
  "semver": "7.6.2"
80
80
  },