froth-webdriverio-framework 4.0.65 → 4.0.67
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.
|
File without changes
|
|
@@ -80,8 +80,19 @@ const commonconfig = {
|
|
|
80
80
|
/// console.log("capabilities:", capabilities);
|
|
81
81
|
capabilities.browserstackLocal = process.env.BROWSERSTACK_LOCAL;
|
|
82
82
|
// capabilities.accessKey = Buffer.from(capabilities.accessKey, 'base64').toString('utf-8');
|
|
83
|
-
if (capabilities.platformName === 'android' || capabilities.platformName === 'ios')
|
|
83
|
+
if (capabilities.platformName === 'android' || capabilities.platformName === 'ios') {
|
|
84
84
|
capabilities.app = process.env.BROWSERSTACK_APP_PATH;
|
|
85
|
+
if (capabilities.app === undefined || capabilities.app === null || capabilities.app === '') {
|
|
86
|
+
console.error("🚨 Error: BROWSERSTACK_APP_PATH is not defined or empty.");
|
|
87
|
+
resultdetails.excution_status = 'FAILED';
|
|
88
|
+
resultdetails.comments.push("BROWSERSTACK_APP_PATH is not defined or empty.");
|
|
89
|
+
await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails);
|
|
90
|
+
process.exit(1); // Stop execution if app path is not set
|
|
91
|
+
}else{
|
|
92
|
+
console.log("App Path:", capabilities.app);
|
|
93
|
+
console.log("Browserstack Local:", capabilities.browserstackLocal);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
85
96
|
|
|
86
97
|
try {
|
|
87
98
|
let mediaFiles = process.env.MEDIA_FILES ? JSON.parse(process.env.MEDIA_FILES) : [];
|
|
@@ -9,7 +9,7 @@ console.log('=====wdios common config===== ');
|
|
|
9
9
|
const PLATFORM = process.env.PLATFORM || 'browserstack';
|
|
10
10
|
console.log('====>PLATFORM:', PLATFORM);
|
|
11
11
|
|
|
12
|
-
const configFile = process.env.YML_NAME
|
|
12
|
+
const configFile = process.env.YML_NAME;
|
|
13
13
|
|
|
14
14
|
const resultdetails = {
|
|
15
15
|
comments: [],
|
|
@@ -24,6 +24,14 @@ let capabilities;
|
|
|
24
24
|
|
|
25
25
|
try {
|
|
26
26
|
capabilities = yaml.load(fs.readFileSync(path.join(path.resolve(process.cwd(), configFile)), 'utf8'));
|
|
27
|
+
// Merge chrome-specific options if applicable
|
|
28
|
+
if ( capabilities.browserName.toLowerCase() === 'chrome') {
|
|
29
|
+
capabilities['goog:chromeOptions'] = {
|
|
30
|
+
prefs: {
|
|
31
|
+
'profile.default_content_setting_values.notifications': 2
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
27
35
|
} catch (e) {
|
|
28
36
|
const errorMsg = `The capability file does not exist in the currently configured repository at path: ${path.resolve(process.cwd(), configFile)}: ${e.message},Please update the Capability by editing the file`;
|
|
29
37
|
console.error(errorMsg);
|