froth-webdriverio-framework 4.0.4 → 4.0.6

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.
@@ -59,7 +59,7 @@ async function getExecuitonDetails(frothUrl, token, id) {
59
59
 
60
60
  async function getExecuitonScriptDetails(frothUrl, token, execution_id, script_id, script_platform) {
61
61
  let id;
62
- console.log("script id is :" + script_id+" script platform is :"+script_platform+" execution id is :"+execution_id+" token is :"+token)
62
+ console.log("script id is :" + script_id + " script platform is :" + script_platform + " execution id is :" + execution_id + " token is :" + token)
63
63
  const url = `${frothUrl}/api/execution-script-mapping/?execution_id=${execution_id}&automation_script_id=${script_id}&platform=${script_platform}`;
64
64
 
65
65
  try {
@@ -119,7 +119,9 @@ async function updateExecuitonDetails(frothUrl, token, id, resultdetails) {
119
119
  formData.append('excution_time', resultdetails.excution_time);
120
120
  }
121
121
  formData.append('id', BUFFER.getItem("FROTH_EXECUTION_ID"))
122
- formData.append('report_url', BUFFER.getItem("REPORT_URL"))
122
+ if (BUFFER.getItem("REPORT_URL") != null)
123
+ formData.append('report_url', BUFFER.getItem("REPORT_URL"))
124
+
123
125
  formData.append('updated_through_bot', true)
124
126
  formData.append('run_id', process.env.CICD_RUN_ID)
125
127
  if (resultdetails.comments != null)
@@ -6,6 +6,7 @@ const setAllDetails = require("./setallDatailinBuffer")
6
6
  const exeDetails = require("../froth_api_calls/getexecutionDetails")
7
7
  const getBSSessionDetails = require("../froth_api_calls/browsersatckSessionInfo").getBSSessionDetails;
8
8
  const { fail } = require("assert");
9
+ const { error } = require('console');
9
10
  //const isBrowserStackEnabled = process.env.BROWSERSTACK;
10
11
  let starttime;
11
12
  let endtime;
@@ -200,6 +201,12 @@ const commonconfig = {
200
201
  resultdetails.comments.push("❌ WebDriver session failed or timed out.");
201
202
  }
202
203
  resultdetails.comments.push(`Execution failed with exit code: ${result}`);
204
+
205
+ process.on('uncaughtException', (err) => {
206
+ console.error("Uncaught Exception:", err);
207
+ resultdetails.comments.push(`Execution failed : ${err}`);
208
+ });
209
+
203
210
  }
204
211
  resultdetails.excution_time = await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION"))
205
212
  await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
4
4
 
5
5
  "readme": "WebdriverIO Integration",
6
6
  "description": "WebdriverIO and BrowserStack App Automate",