froth-webdriverio-framework 3.0.53 → 3.0.54

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.
@@ -98,6 +98,16 @@ async function getBSSessionDetails(sessiontype, bs_username, bs_pwd) {
98
98
 
99
99
  }
100
100
 
101
+ async function amend2Browserstack(annotationMessage, level) {
102
+ try {
103
+ await driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"' + annotationMessage + '","level": "' + level + '"}}');
104
+
105
+ } catch (error) {
106
+ console.error('Error occurred while annoting to BS :', error);
107
+ throw error;
108
+ }
109
+ }
110
+
101
111
  //Execute the main function
102
112
 
103
113
  //Main function to execute the API call
@@ -111,5 +121,8 @@ async function getBSSessionDetails(sessiontype, bs_username, bs_pwd) {
111
121
  // }
112
122
 
113
123
  // main();
114
- module.exports = getBSSessionDetails;
124
+ module.exports = {getBSSessionDetails,
125
+ getBSBuildDetails,
126
+ amend2Browserstack
127
+ };
115
128
 
@@ -1,3 +1,4 @@
1
+ const amendToBrowserstack = require("../api/browsersatckSessionInfo").amend2Browserstack;
1
2
 
2
3
  async function callapi(method, api_url, queryParams, payloaddetails, authentication, headers, attachments) {
3
4
  let response;
@@ -72,6 +73,8 @@ async function formheaders(authentication, headers) {
72
73
  } catch (e) {
73
74
 
74
75
  console.error('Error in formheaders:', e);
76
+ let annotationMessage = 'Error during API call:'+ error.response ? error.response.data : error.message;
77
+
75
78
  }
76
79
  return headers;
77
80
 
@@ -89,6 +92,7 @@ async function validate(attribute_name, attribute, actionname, buffer, buffernam
89
92
  }
90
93
  } catch (e) {
91
94
  console.error('Error in validate method:', e);
95
+
92
96
  }
93
97
  }
94
98
 
@@ -124,13 +128,13 @@ async function validateAttributeData(attribute_name,attribute,buffer, buffername
124
128
  await amendToBrowserstack(annotationMessage, "error");
125
129
  }
126
130
  }
127
- async function amendToBrowserstack(annotationMessage, level) {
128
- try {
129
- await driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"' + annotationMessage + '","level": "' + level + '"}}');
130
-
131
- } catch (error) {
132
- console.error('Error occurred while annoting to BS :', error);
133
- throw error;
134
- }
135
- }
131
+ // async function amendToBrowserstack(annotationMessage, level) {
132
+ // try {
133
+ // await driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"' + annotationMessage + '","level": "' + level + '"}}');
134
+
135
+ // } catch (error) {
136
+ // console.error('Error occurred while annoting to BS :', error);
137
+ // throw error;
138
+ // }
139
+ // }
136
140
  module.exports = { callapi, validate };
@@ -3,7 +3,7 @@ const { LocalStorage } = require('node-localstorage');
3
3
  global.BUFFER = new LocalStorage('./storage');
4
4
  const path = require('path');
5
5
  const exeDetails = require("../api/getexecutionDetails")
6
- const getBSSessionDetails = require("../api/browsersatckSessionInfo");
6
+ const getBSSessionDetails = require("../api/browsersatckSessionInfo").getBSSessionDetails;
7
7
  const { fail } = require("assert");
8
8
  const isBrowserStackEnabled = process.env.BROWSERSTACK;
9
9
  let starttime;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.53",
3
+ "version": "3.0.54",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",