@applitools/driver 1.19.3 → 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 +15 -0
- package/dist/context.js +3 -0
- package/dist/fake/mock-driver.js +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
3
18
|
## [1.19.3](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.19.2...js/driver@1.19.3) (2024-10-21)
|
|
4
19
|
|
|
5
20
|
|
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/fake/mock-driver.js
CHANGED
|
@@ -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-
|
|
149
|
-
return [`[data-applitools-
|
|
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-
|
|
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
|
+
"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.
|
|
77
|
+
"@applitools/snippets": "2.5.2",
|
|
78
78
|
"@applitools/utils": "1.7.4",
|
|
79
79
|
"semver": "7.6.2"
|
|
80
80
|
},
|