froth-webdriverio-framework 3.0.44 → 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.
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.44",
3
+ "version": "3.0.45",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",