@applitools/spec-driver-playwright 1.3.29 → 1.3.30
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 +7 -0
- package/dist/spec-driver.js +5 -5
- package/package.json +5 -5
- package/types/index.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.30](https://github.com/applitools/eyes.sdk.javascript1/compare/js/spec-driver-playwright@1.3.29...js/spec-driver-playwright@1.3.30) (2023-10-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* improve locator transformation to simple common selector ([#1981](https://github.com/applitools/eyes.sdk.javascript1/issues/1981)) ([579dedd](https://github.com/applitools/eyes.sdk.javascript1/commit/579dedd57304b2f2f2bd3a39bdead30bea7131f0))
|
|
9
|
+
|
|
3
10
|
## [1.3.29](https://github.com/applitools/eyes.sdk.javascript1/compare/js/spec-driver-playwright@1.3.28...js/spec-driver-playwright@1.3.29) (2023-10-17)
|
|
4
11
|
|
|
5
12
|
|
package/dist/spec-driver.js
CHANGED
|
@@ -93,12 +93,12 @@ function toSelector(selector) {
|
|
|
93
93
|
exports.toSelector = toSelector;
|
|
94
94
|
function toSimpleCommonSelector(selector) {
|
|
95
95
|
if (utils.types.instanceOf(selector, 'Locator')) {
|
|
96
|
-
;
|
|
97
|
-
[, selector] = selector.toString().match(/Locator@(.+)/);
|
|
96
|
+
selector = selector._selector;
|
|
98
97
|
}
|
|
99
|
-
if (utils.types.
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
else if (utils.types.instanceOf(selector, 'FrameLocator')) {
|
|
99
|
+
selector = selector._frameSelector;
|
|
100
|
+
}
|
|
101
|
+
return utils.types.isString(selector) ? { selector } : null;
|
|
102
102
|
}
|
|
103
103
|
exports.toSimpleCommonSelector = toSimpleCommonSelector;
|
|
104
104
|
function extractContext(page) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/spec-driver-playwright",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.30",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"playwright",
|
|
6
6
|
"chrome devtools protocol",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"lint": "run --top-level eslint '**/*.ts'",
|
|
36
36
|
"build": "run --top-level tspc --project ./tsconfig.build.json",
|
|
37
37
|
"test": "run --top-level mocha './test/**/*.spec.ts' --exit",
|
|
38
|
-
"setup": "
|
|
39
|
-
"playwright:setup": "
|
|
40
|
-
"up:framework": "
|
|
38
|
+
"setup": "run playwright:setup",
|
|
39
|
+
"playwright:setup": "yarn playwright install --with-deps chromium firefox webkit",
|
|
40
|
+
"up:framework": "echo \"$(jq '.devDependencies.playwright = $ENV.APPLITOOLS_FRAMEWORK_VERSION' ./package.json)\" > ./package.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@applitools/driver": "1.14.4",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@applitools/api-extractor": "^1.2.22",
|
|
48
48
|
"@applitools/test-utils": "^1.5.17",
|
|
49
49
|
"@types/node": "^12.20.55",
|
|
50
|
-
"playwright": "^1.
|
|
50
|
+
"playwright": "^1.39.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"playwright": ">=1.0.0"
|
package/types/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export function isElement(element: any): element is Element<Node>;
|
|
|
6
6
|
export function isSelector(selector: any): selector is Selector;
|
|
7
7
|
export function isStaleElementError(err: any): boolean;
|
|
8
8
|
export function toSelector(selector: import('@applitools/driver').CommonSelector<Selector>): Selector;
|
|
9
|
-
export function toSimpleCommonSelector(selector: Selector): import('@applitools/driver').CommonSelector;
|
|
9
|
+
export function toSimpleCommonSelector(selector: Selector): null | import('@applitools/driver').CommonSelector;
|
|
10
10
|
export function extractContext(page: Driver): Context;
|
|
11
11
|
export function executeScript(frame: Context, script: string | ((arg: any) => any), arg: any): Promise<any>;
|
|
12
12
|
export function findElement(frame: Context, selector: Selector, parent?: undefined | Element<Node>): Promise<null | Element<SVGElement | HTMLElement>>;
|