froth-webdriverio-framework 6.0.25 → 6.0.26

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.
@@ -76,38 +76,38 @@ const commonconfig = {
76
76
  process.exit(1);
77
77
  }
78
78
  // set the capability like media and app and bs local
79
- if (process.env.PLATFORM === 'browserstack') {
80
- /// console.log("capabilities:", capabilities);
81
- capabilities.browserstackLocal = process.env.BROWSERSTACK_LOCAL;
82
- // capabilities.accessKey = Buffer.from(capabilities.accessKey, 'base64').toString('utf-8');
83
- if (capabilities.platformName === 'android' || capabilities.platformName === 'ios') {
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
- }
96
-
97
- try {
98
- let mediaFiles = process.env.MEDIA_FILES ? JSON.parse(process.env.MEDIA_FILES) : [];
99
- console.log("Size of Media Files:", Array.isArray(mediaFiles) ? mediaFiles.length : "Invalid data");
100
-
101
- if (Array.isArray(mediaFiles) && mediaFiles.length > 0) {
102
- console.log("Media Files:", JSON.parse(process.env.MEDIA_FILES));
103
- capabilities['browserstack.uploadMedia'] = JSON.parse(process.env.MEDIA_FILES);
104
- }
105
- } catch (error) {
106
- console.error("Error parsing MEDIA_FILES:", error);
107
- }
108
-
109
- console.log(`Running tests on after app,bslocal,mediafiles: ${JSON.stringify(capabilities)}`);
110
- }
79
+ // if (process.env.PLATFORM === 'browserstack') {
80
+ // /// console.log("capabilities:", capabilities);
81
+ // capabilities.browserstackLocal = process.env.BROWSERSTACK_LOCAL;
82
+ // // capabilities.accessKey = Buffer.from(capabilities.accessKey, 'base64').toString('utf-8');
83
+ // if (capabilities.platformName === 'android' || capabilities.platformName === 'ios') {
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
+ // }
96
+
97
+ // try {
98
+ // let mediaFiles = process.env.MEDIA_FILES ? JSON.parse(process.env.MEDIA_FILES) : [];
99
+ // console.log("Size of Media Files:", Array.isArray(mediaFiles) ? mediaFiles.length : "Invalid data");
100
+
101
+ // if (Array.isArray(mediaFiles) && mediaFiles.length > 0) {
102
+ // console.log("Media Files:", JSON.parse(process.env.MEDIA_FILES));
103
+ // capabilities['browserstack.uploadMedia'] = JSON.parse(process.env.MEDIA_FILES);
104
+ // }
105
+ // } catch (error) {
106
+ // console.error("Error parsing MEDIA_FILES:", error);
107
+ // }
108
+
109
+ // console.log(`Running tests on after app,bslocal,mediafiles: ${JSON.stringify(capabilities)}`);
110
+ // }
111
111
 
112
112
  } catch (error) {
113
113
  console.error('🚨 Error in beforeSession:', error);
@@ -101,8 +101,8 @@ const specificConfig = setupPrerequisites();
101
101
  exports.config = deepmerge(commonconfig,
102
102
 
103
103
  {
104
- user: 'naveen_OSt3Pw',//process.env.BROWSERSTACK_USERNAME,
105
- key: 'B9Rx28MTKFzRJ2QEVK1c',//process.env.BROWSERSTACK_ACCESS_KEY,
104
+ user: process.env.BROWSERSTACK_USERNAME,
105
+ key: process.env.BROWSERSTACK_ACCESS_KEY,
106
106
  // debug: true,
107
107
  // execArgv: ['--inspect-brk'],
108
108
  services: PLATFORM === 'browserstack'
@@ -111,45 +111,21 @@ exports.config = deepmerge(commonconfig,
111
111
  ? ['sauce']
112
112
  : [],
113
113
 
114
- runner: 'local',
114
+ //runner: 'local',
115
115
  specs: require(SUITE_FILE).tests,
116
116
 
117
117
  maxInstances: 1,
118
- // capabilities: [capabilities],
118
+ // capabilities: [capabilities],
119
119
  capabilities: [{
120
- platformName: "android",
121
-
122
- // ❗ automationName MUST be present for Appium/W3C
123
- "appium:automationName": "UIAutomator2",
124
-
125
- // ❗ App path stays under Appium namespace
126
- "appium:app": "bs://30fdf3a163d0bad126f64a3d5713e9ab0086a41e",
127
-
128
- // Vendor capabilities must go inside bstack:options
129
- "bstack:options": {
130
- userName: "naveen_OSt3Pw",
131
- accessKey: "B9Rx28MTKFzRJ2QEVK1c",
132
-
133
- deviceName: "Samsung Galaxy S22 Ultra",
134
- platformVersion: "12.0",
135
-
136
- buildName: "yesshop_319_20251208",
137
- buildIdentifier: "${BUILD_NUMBER}",
138
-
139
- projectName: "Yesshop Automation",
140
- sessionName: "Prepaid Reload",
141
-
142
- debug: true,
143
- networkLogs: true,
144
-
145
- // ❗ This must be inside bstack:options
146
- browserstackLocal: false,
147
-
148
- // Extra flags (optional)
149
- interactiveDebugging: true,
150
- deviceOrientation: "portrait"
151
- }
120
+ // capabilities for local Appium web tests on an Android Emulator
121
+ platformName: 'Android',
122
+ browserName: 'Chrome',
123
+ 'appium:app': 'bs://30fdf3a163d0bad126f64a3d5713e9ab0086a41e',
124
+ 'appium:deviceName': 'Samsung Galaxy S22 Ultra',
125
+ 'appium:platformVersion': '12.0',
126
+ 'appium:automationName': 'UiAutomator2'
152
127
  }],
128
+
153
129
  logLevel: 'info',
154
130
  coloredLogs: true,
155
131
  screenshotPath: './errorShots/',