@percy/webdriver-utils 1.27.0-beta.2 → 1.27.0
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/dist/index.js +5 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -31,12 +31,16 @@ export default class WebdriverUtils {
|
|
|
31
31
|
}
|
|
32
32
|
async automateScreenshot() {
|
|
33
33
|
try {
|
|
34
|
+
const startTime = Date.now();
|
|
34
35
|
this.log.info(`[${this.snapshotName}] : Starting automate screenshot ...`);
|
|
35
36
|
const automate = ProviderResolver.resolve(this.sessionId, this.commandExecutorUrl, this.capabilities, this.sessionCapabilites, this.clientInfo, this.environmentInfo, this.options, this.buildInfo);
|
|
36
37
|
this.log.debug(`[${this.snapshotName}] : Resolved provider ...`);
|
|
37
38
|
await automate.createDriver();
|
|
38
39
|
this.log.debug(`[${this.snapshotName}] : Created driver ...`);
|
|
39
|
-
|
|
40
|
+
const comparisonData = await automate.screenshot(this.snapshotName, this.options);
|
|
41
|
+
comparisonData.metadata.cliScreenshotStartTime = startTime;
|
|
42
|
+
comparisonData.metadata.cliScreenshotEndTime = Date.now();
|
|
43
|
+
return comparisonData;
|
|
40
44
|
} catch (e) {
|
|
41
45
|
this.log.error(`[${this.snapshotName}] : Error - ${e.message}`);
|
|
42
46
|
this.log.error(`[${this.snapshotName}] : Error Log - ${e.toString()}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/webdriver-utils",
|
|
3
|
-
"version": "1.27.0
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "latest"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=14"
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"test:coverage": "yarn test --coverage"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@percy/config": "1.27.0
|
|
33
|
-
"@percy/sdk-utils": "1.27.0
|
|
32
|
+
"@percy/config": "1.27.0",
|
|
33
|
+
"@percy/sdk-utils": "1.27.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "3b92a894d4cf6dcdedccf42b86aaf61f331535c6"
|
|
36
36
|
}
|