froth-webdriverio-framework 6.0.1 → 6.0.3
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.
|
@@ -80,7 +80,10 @@ const commonconfig = {
|
|
|
80
80
|
// set the capability like media and app and bs local
|
|
81
81
|
if (process.env.PLATFORM === 'browserstack') {
|
|
82
82
|
/// console.log("capabilities:", capabilities);
|
|
83
|
-
|
|
83
|
+
console.log("====> BROWSERSTACK_LOCAL : " + process.env.BROWSERSTACK_LOCAL);
|
|
84
|
+
const isLocalEnabled = process.env.BROWSERSTACK_LOCAL === "true";
|
|
85
|
+
|
|
86
|
+
if (isLocalEnabled) {
|
|
84
87
|
bsLocal = new browserstack.Local();
|
|
85
88
|
const localArgs = {
|
|
86
89
|
key: process.env.BROWSERSTACK_ACCESS_KEY,
|
|
@@ -100,17 +103,24 @@ const commonconfig = {
|
|
|
100
103
|
capabilities['browserstack.local'] = true;
|
|
101
104
|
capabilities['browserstack.localIdentifier'] = localArgs.localIdentifier || 'ExecuteLocal';
|
|
102
105
|
}
|
|
106
|
+
else
|
|
107
|
+
console.log("====> BROWSERSTACK_LOCAL not set. Skipping BrowserStack Local startup." + process.env.BROWSERSTACK_LOCAL);
|
|
108
|
+
|
|
103
109
|
// capabilities.accessKey = Buffer.from(capabilities.accessKey, 'base64').toString('utf-8');
|
|
104
110
|
if (capabilities.platformName === 'android' || capabilities.platformName === 'ios') {
|
|
105
|
-
capabilities
|
|
106
|
-
|
|
111
|
+
capabilities['appium:app'] = process.env.BROWSERSTACK_APP_PATH;
|
|
112
|
+
|
|
113
|
+
// capabilities.app = process.env.BROWSERSTACK_APP_PATH;
|
|
114
|
+
const appValue = capabilities['appium:app'];
|
|
115
|
+
console.log("App Value:", appValue);
|
|
116
|
+
if (appValue === undefined || appValue === null || appValue === '') {
|
|
107
117
|
console.error("🚨 Error: BROWSERSTACK_APP_PATH is not defined or empty.");
|
|
108
118
|
resultdetails.excution_status = 'FAILED';
|
|
109
119
|
resultdetails.comments.push("BROWSERSTACK_APP_PATH is not defined or empty.");
|
|
110
120
|
await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails);
|
|
111
121
|
process.exit(1); // Stop execution if app path is not set
|
|
112
122
|
} else {
|
|
113
|
-
console.log("App Path:", capabilities
|
|
123
|
+
console.log("App Path:", capabilities['appium:app']);
|
|
114
124
|
console.log("Browserstack Local:", capabilities.browserstackLocal);
|
|
115
125
|
}
|
|
116
126
|
}
|