@applitools/driver 1.19.3 → 1.19.5

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.5](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.19.4...js/driver@1.19.5) (2024-10-31)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * @applitools/snippets bumped to 2.6.0
9
+ #### Features
10
+
11
+ * html report for playwright ([#2576](https://github.com/Applitools-Dev/sdk/issues/2576)) ([f93f164](https://github.com/Applitools-Dev/sdk/commit/f93f164a289f5676bcc9d650e5e3d90b8e6a6920))
12
+
13
+ ## [1.19.4](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.19.3...js/driver@1.19.4) (2024-10-28)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * better handling of stale elements ([cab10ff](https://github.com/Applitools-Dev/sdk/commit/cab10ff1ae1e6f9560a7d278c710b3fa03f58c83))
19
+
20
+
21
+ ### Dependencies
22
+
23
+ * @applitools/snippets bumped to 2.5.2
24
+ #### Bug Fixes
25
+
26
+ * better handling of stale elements ([cab10ff](https://github.com/Applitools-Dev/sdk/commit/cab10ff1ae1e6f9560a7d278c710b3fa03f58c83))
27
+
3
28
  ## [1.19.3](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.19.2...js/driver@1.19.3) (2024-10-21)
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
  }
@@ -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.3",
3
+ "version": "1.19.5",
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.1",
77
+ "@applitools/snippets": "2.6.0",
78
78
  "@applitools/utils": "1.7.4",
79
79
  "semver": "7.6.2"
80
80
  },