froth-webdriverio-framework 5.0.6 → 5.0.7
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.
|
@@ -115,13 +115,19 @@ async function amend2Browserstack(annotationMessage, level) {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
//Execute the main function
|
|
118
|
+
// Execute the main function
|
|
119
119
|
|
|
120
|
-
//Main function to execute the API call
|
|
120
|
+
// Main function to execute the API call
|
|
121
121
|
// async function main() {
|
|
122
122
|
// try {
|
|
123
|
-
//
|
|
124
|
-
//
|
|
123
|
+
// /// BUFFER.setItem("EXECUTION_SESSIONID","297666e2fd4195de98d7da3b359669072ff41a2a");
|
|
124
|
+
// const login=0.30;
|
|
125
|
+
// const landing=0.30;
|
|
126
|
+
// const home=0.30;
|
|
127
|
+
// const payment=0.30;
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
// await amend2Browserstack("\n Page load time for login page:"+login+"\n Page load time for landing page:"+landing+"\n Page load time for home page:"+home+"\n Page load time for payment page:"+payment, "info");
|
|
125
131
|
// } catch (error) {
|
|
126
132
|
// console.error('Error in main function:', error);
|
|
127
133
|
// }
|
|
@@ -37,9 +37,10 @@ async function captureLoadNavigationTime(pageName = '') {
|
|
|
37
37
|
.trim(); // remove leading/trailing spaces
|
|
38
38
|
|
|
39
39
|
pageLoadTime = perfEntries.loadEventEnd; // Already relative to startTime
|
|
40
|
-
|
|
40
|
+
pageLoadTime = (pageLoadTime / 1000).toFixed(2); // Convert ms to seconds, keep 2 decimals
|
|
41
|
+
await amendToBrowserstack(`⏱ Page Load Time for ${title}: ${pageLoadTime} seconds`, "info");
|
|
41
42
|
|
|
42
|
-
console.log(`⏱ Page Load Time for ${title}: ${pageLoadTime}
|
|
43
|
+
console.log(`⏱ Page Load Time for ${title}: ${pageLoadTime} seconds`);
|
|
43
44
|
} catch (error) {
|
|
44
45
|
console.error('Error capturing navigation timing:', error);
|
|
45
46
|
}
|