froth-webdriverio-framework 3.0.43 → 3.0.45
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.
- package/commonMethods/apicall.js +12 -1
- package/config/commonconfig.js +1 -1
- package/package.json +1 -1
package/commonMethods/apicall.js
CHANGED
|
@@ -22,6 +22,7 @@ async function callapi(method, api_url, queryParams, payloaddetails, authenticat
|
|
|
22
22
|
};
|
|
23
23
|
// Only add the body if the method is not GET or HEAD
|
|
24
24
|
if (method !== 'GET' && method !== 'HEAD') {
|
|
25
|
+
console.log("inside if loop if its POST or PUT");
|
|
25
26
|
options.body = formData;
|
|
26
27
|
}
|
|
27
28
|
console.log("options:", JSON.stringify(options, null, 2));
|
|
@@ -57,8 +58,9 @@ async function formheaders(authentication, headers) {
|
|
|
57
58
|
|
|
58
59
|
}
|
|
59
60
|
async function validate(attribute, actionname, buffer, value, datatype) {
|
|
61
|
+
let valueToVerify;
|
|
62
|
+
|
|
60
63
|
try {
|
|
61
|
-
let valueToVerify;
|
|
62
64
|
let assertionStatus = false; // Initialize status
|
|
63
65
|
|
|
64
66
|
if (actionname.toLowerCase() == "verify") {
|
|
@@ -91,4 +93,13 @@ async function validate(attribute, actionname, buffer, value, datatype) {
|
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
|
|
96
|
+
async function amendToBrowserstack(annotationMessage, level) {
|
|
97
|
+
try {
|
|
98
|
+
await driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"' + annotationMessage + '","level": "' + level + '"}}');
|
|
99
|
+
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.error('Error occurred while verifying text:', error);
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
94
105
|
module.exports = { callapi, validate };
|
package/config/commonconfig.js
CHANGED
|
@@ -46,7 +46,7 @@ const commonconfig = {
|
|
|
46
46
|
|
|
47
47
|
starttime = new Date().getTime();
|
|
48
48
|
|
|
49
|
-
if (isBrowserStackEnabled
|
|
49
|
+
if (isBrowserStackEnabled) {
|
|
50
50
|
console.log("BrowserStack is enabled");
|
|
51
51
|
await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
|
|
52
52
|
}
|