froth-webdriverio-framework 3.0.55 → 3.0.57
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.
|
@@ -100,6 +100,7 @@ async function getBSSessionDetails(sessiontype, bs_username, bs_pwd) {
|
|
|
100
100
|
|
|
101
101
|
async function amend2Browserstack(annotationMessage, level) {
|
|
102
102
|
try {
|
|
103
|
+
console.log("Annotation message inside amend2Browserstack:" + annotationMessage)
|
|
103
104
|
await driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"' + annotationMessage + '","level": "' + level + '"}}');
|
|
104
105
|
|
|
105
106
|
} catch (error) {
|
package/commonMethods/apicall.js
CHANGED
|
@@ -32,12 +32,12 @@ async function callapi(method, api_url, queryParams, payloaddetails, authenticat
|
|
|
32
32
|
// Send the request
|
|
33
33
|
response = await fetch(api_url, options);
|
|
34
34
|
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
35
|
+
} catch (error) {
|
|
37
36
|
console.error('Error during API call in call api menthod:', error);
|
|
38
|
-
let annotationMessage = 'Error during API call:'+ error.response ? error.response.data : error.message;
|
|
39
|
-
if (process.env.BROWSERSTACK)
|
|
40
|
-
|
|
37
|
+
let annotationMessage = 'Error during API call:' + error.response ? error.response.data : error.message;
|
|
38
|
+
// if (process.env.BROWSERSTACK)
|
|
39
|
+
await amendToBrowserstack(annotationMessage, "error");
|
|
40
|
+
throw error;
|
|
41
41
|
}
|
|
42
42
|
return response;
|
|
43
43
|
}
|
|
@@ -76,7 +76,7 @@ async function formheaders(authentication, headers) {
|
|
|
76
76
|
} catch (e) {
|
|
77
77
|
|
|
78
78
|
console.error('Error in formheaders:', e);
|
|
79
|
-
let annotationMessage = 'Error during API call:'+ error.response ? error.response.data : error.message;
|
|
79
|
+
let annotationMessage = 'Error during API call:' + error.response ? error.response.data : error.message;
|
|
80
80
|
|
|
81
81
|
}
|
|
82
82
|
return headers;
|
|
@@ -87,7 +87,7 @@ async function validate(attribute_name, attribute, actionname, buffer, buffernam
|
|
|
87
87
|
try {
|
|
88
88
|
|
|
89
89
|
if (actionname.toLowerCase() == "verify") {
|
|
90
|
-
await validateAttributeData(attribute_name,attribute,buffer, buffername_value, datatype);
|
|
90
|
+
await validateAttributeData(attribute_name, attribute, buffer, buffername_value, datatype);
|
|
91
91
|
} else if (actionname.toLowerCase() == "setbuffer") {
|
|
92
92
|
BUFFER.setItem(buffername_value, attribute);
|
|
93
93
|
} else if (actionname.toLowerCase() == "getbuffer") {
|
|
@@ -95,11 +95,11 @@ async function validate(attribute_name, attribute, actionname, buffer, buffernam
|
|
|
95
95
|
}
|
|
96
96
|
} catch (e) {
|
|
97
97
|
console.error('Error in validate method:', e);
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
async function validateAttributeData(attribute_name,attribute,buffer, buffername_value, datatype) {
|
|
102
|
+
async function validateAttributeData(attribute_name, attribute, buffer, buffername_value, datatype) {
|
|
103
103
|
let assertionStatus = false; // Initialize status
|
|
104
104
|
let valueToVerify;
|
|
105
105
|
|
package/commonMethods/swipe.js
CHANGED
|
@@ -3,9 +3,9 @@ async function swipeleft(selector, xoffset, speedinsec) {
|
|
|
3
3
|
console.log('Swiping left');
|
|
4
4
|
|
|
5
5
|
if (xoffset == null) {
|
|
6
|
-
|
|
6
|
+
driver.swipeLeft(selector, speedinsec);
|
|
7
7
|
} else {
|
|
8
|
-
|
|
8
|
+
driver.swipeLeft(selector, xoffset, speedinsec);
|
|
9
9
|
}
|
|
10
10
|
} catch (error) {
|
|
11
11
|
console.error(error.message);
|
|
@@ -18,9 +18,9 @@ async function swiperight(selector, xoffset, speedinsec) {
|
|
|
18
18
|
console.log('Swiping right');
|
|
19
19
|
|
|
20
20
|
if (xoffset == null) {
|
|
21
|
-
|
|
21
|
+
driver.swipeRight(selector, speedinsec);
|
|
22
22
|
} else {
|
|
23
|
-
|
|
23
|
+
driver.swipeRight(selector, xoffset, speedinsec);
|
|
24
24
|
}
|
|
25
25
|
} catch (error) {
|
|
26
26
|
console.error(error.message);
|
|
@@ -33,9 +33,9 @@ async function swipeup(selector, yoffset, speedinsec) {
|
|
|
33
33
|
console.log('Swiping up');
|
|
34
34
|
|
|
35
35
|
if (yoffset == null) {
|
|
36
|
-
|
|
36
|
+
driver.swipeUp(selector, speedinsec);
|
|
37
37
|
} else {
|
|
38
|
-
|
|
38
|
+
driver.swipeUp(selector, yoffset, speedinsec);
|
|
39
39
|
}
|
|
40
40
|
} catch (error) {
|
|
41
41
|
console.error(error.message);
|
|
@@ -47,9 +47,9 @@ async function swipedown(selector, yoffset, speedinsec) {
|
|
|
47
47
|
console.log('Swiping down');
|
|
48
48
|
|
|
49
49
|
if (yoffset == null) {
|
|
50
|
-
|
|
50
|
+
driver.swipeDown(selector, speedinsec);
|
|
51
51
|
} else {
|
|
52
|
-
|
|
52
|
+
driver.swipeDown(selector, yoffset, speedinsec);
|
|
53
53
|
}
|
|
54
54
|
} catch (error) {
|
|
55
55
|
console.error(error.message);
|