froth-webdriverio-framework 3.0.122 → 3.0.124
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.
|
@@ -141,8 +141,8 @@ async function validateAttributeData(attribute_name, attribute, buffer, bufferna
|
|
|
141
141
|
|
|
142
142
|
} catch (e) {
|
|
143
143
|
console.error('Error in validateAttributeData:', e);
|
|
144
|
-
console.log(`Attribute name : ${attribute_name} verification failed. Expected text: ${valueToVerify}. error: ${e.
|
|
145
|
-
let annotationMessage = `Attribute name : ${attribute_name} - verification failed. Expected text: ${valueToVerify}. error: ${e.
|
|
144
|
+
console.log(`Attribute name : ${attribute_name} verification failed. Expected text: ${valueToVerify}. error: ${e.toString()}`);
|
|
145
|
+
let annotationMessage = `Attribute name : ${attribute_name} - verification failed. Expected text: ${valueToVerify}. error: ${e.toString()}`;
|
|
146
146
|
await amendToBrowserstack(annotationMessage, "error");
|
|
147
147
|
|
|
148
148
|
throw e;
|
|
@@ -40,6 +40,25 @@ const commonconfig = {
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
|
|
43
|
+
before: async function (capabilities, specs) {
|
|
44
|
+
console.log('==== BEFORE HOOK ====');
|
|
45
|
+
|
|
46
|
+
// Capture uncaught exceptions (including syntax errors)
|
|
47
|
+
process.on('uncaughtException', (err) => {
|
|
48
|
+
console.error("Uncaught Exception:", err);
|
|
49
|
+
resultdetails.comments.push(`Execution failed with exit code: ${err}`);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Capture unhandled promise rejections
|
|
53
|
+
process.on('unhandledRejection', (reason, promise) => {
|
|
54
|
+
console.error("Unhandled Promise Rejection:", reason);
|
|
55
|
+
resultdetails.comments.push(`Execution failed with exit code: ${reason}`);
|
|
56
|
+
});
|
|
57
|
+
resultdetails.excution_status='SKIPPED';
|
|
58
|
+
await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
|
|
59
|
+
|
|
60
|
+
},
|
|
61
|
+
|
|
43
62
|
|
|
44
63
|
beforeSession: async function (config, capabilities, specs) {
|
|
45
64
|
try {
|
|
@@ -66,6 +85,7 @@ const commonconfig = {
|
|
|
66
85
|
|
|
67
86
|
console.log(`Running tests on after app,bslocal,mediafiles: ${JSON.stringify(capabilities)}`);
|
|
68
87
|
}
|
|
88
|
+
|
|
69
89
|
} catch (error) {
|
|
70
90
|
console.error('🚨 Error in beforeSession:', error);
|
|
71
91
|
console.error('🚨 Error in beforeSession:', error.message);
|