froth-webdriverio-framework 3.0.52 → 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
|
|
package/commonMethods/apicall.js
CHANGED
|
@@ -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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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 };
|
package/config/api.conf.js
CHANGED
|
@@ -25,9 +25,9 @@ const apiconfig = deepmerge.all([commonmobileconfig, {
|
|
|
25
25
|
projectName: process.env.PROJECTNAME || "roboticodigital",
|
|
26
26
|
|
|
27
27
|
browserName: 'chrome', // Choose the browser you want to test
|
|
28
|
-
|
|
28
|
+
// browserVersion: '129', // Specify the browser version
|
|
29
29
|
os: 'Windows', // Specify the operating system
|
|
30
|
-
|
|
30
|
+
// os_version: '10', // Specify the operating system version
|
|
31
31
|
interactiveDebugging: true,
|
|
32
32
|
buildName: process.env.BROWSERSTACK_BUILD_NAME || 'WEB_Build',
|
|
33
33
|
networkLogs: "true",
|
package/config/commonconfig.js
CHANGED
|
@@ -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;
|