froth-webdriverio-framework 5.0.5 → 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
- // BUFFER.setItem("EXECUTION_SESSIONID","297666e2fd4195de98d7da3b359669072ff41a2a");
124
- // await getBrowserstackDetails();
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
  // }
@@ -111,7 +111,7 @@ dismissAlert = require(basepath + '/alert.js').dismissalert;
111
111
  generateJWT = require(basepath + '/jwt').generateJWTToken;
112
112
  captureLoadNavigation= require(basepath + '/captureNavigationTime').captureLoadNavigationTime;
113
113
 
114
- amendBrowserStackLog= require(basepath + '../froth_api_calls/browsersatckSessionInfo').amend2Browserstack;
114
+ amendBrowserStackLog= require(basepath + '/../froth_api_calls/browsersatckSessionInfo').amend2Browserstack;
115
115
  //export the variabels
116
116
  module.exports = {
117
117
  scrollToEnd,
@@ -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
- await amendToBrowserstack(`⏱ Page Load Time for ${title}: ${pageLoadTime} ms`, "info");
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} ms`);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "5.0.5",
3
+ "version": "5.0.7",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",