@applitools/spec-driver-selenium 1.0.1 → 1.1.1
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 +16 -4
- package/dist/spec-driver.js +9 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
## 1.0.1 - 2021/10/12
|
|
3
|
-
|
|
4
|
-
- spec driver implementation for selenium framework
|
|
5
1
|
# Change Log
|
|
6
2
|
|
|
7
3
|
## Unreleased
|
|
8
4
|
|
|
5
|
+
|
|
6
|
+
## 1.1.1 - 2021/10/20
|
|
7
|
+
|
|
8
|
+
- install prettier
|
|
9
|
+
|
|
10
|
+
## 1.1.0 - 2021/10/12
|
|
11
|
+
|
|
12
|
+
- change default selenium version
|
|
13
|
+
|
|
14
|
+
## 1.0.2 - 2021/10/12
|
|
15
|
+
|
|
16
|
+
- handle non-w3c appium driver
|
|
17
|
+
|
|
18
|
+
## 1.0.1 - 2021/10/12
|
|
19
|
+
|
|
20
|
+
- spec driver implementation for selenium framework
|
package/dist/spec-driver.js
CHANGED
|
@@ -146,7 +146,7 @@ async function getWindowSize(driver) {
|
|
|
146
146
|
if (utils.types.isFunction(window.getSize)) {
|
|
147
147
|
return await window.getSize();
|
|
148
148
|
}
|
|
149
|
-
else
|
|
149
|
+
else {
|
|
150
150
|
const rect = await window.getRect();
|
|
151
151
|
return { width: rect.width, height: rect.height };
|
|
152
152
|
}
|
|
@@ -285,7 +285,14 @@ async function getOrientation(driver) {
|
|
|
285
285
|
}
|
|
286
286
|
exports.getOrientation = getOrientation;
|
|
287
287
|
async function getElementRegion(_driver, element) {
|
|
288
|
-
|
|
288
|
+
if (utils.types.isFunction(element.getRect)) {
|
|
289
|
+
return element.getRect();
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
const { x, y } = await element.getLocation();
|
|
293
|
+
const { width, height } = await element.getSize();
|
|
294
|
+
return { x, y, width, height };
|
|
295
|
+
}
|
|
289
296
|
}
|
|
290
297
|
exports.getElementRegion = getElementRegion;
|
|
291
298
|
async function getElementAttribute(_driver, element, attr) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/spec-driver-selenium",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"selenium",
|
|
6
6
|
"selenium-webdriver",
|
|
@@ -54,10 +54,9 @@
|
|
|
54
54
|
"@applitools/utils": "1.2.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@applitools/api-extractor": "1.1.3",
|
|
58
57
|
"@applitools/scripts": "1.0.1",
|
|
59
58
|
"@applitools/sdk-release-kit": "0.13.3",
|
|
60
|
-
"@applitools/test-utils": "1.0.
|
|
59
|
+
"@applitools/test-utils": "1.0.9",
|
|
61
60
|
"@types/mocha": "^9.0.0",
|
|
62
61
|
"@types/node": "^16.10.2",
|
|
63
62
|
"@types/selenium-webdriver": "^4.0.15",
|
|
@@ -70,7 +69,8 @@
|
|
|
70
69
|
"eslint-plugin-prettier": "^3.3.1",
|
|
71
70
|
"husky": "^4.3.7",
|
|
72
71
|
"mocha": "^9.1.2",
|
|
73
|
-
"
|
|
72
|
+
"prettier": "^2.4.1",
|
|
73
|
+
"selenium-webdriver": "^4.0.0-rc-2",
|
|
74
74
|
"ts-node": "^10.2.1",
|
|
75
75
|
"typescript": "^4.4.3"
|
|
76
76
|
},
|