froth-webdriverio-framework 7.0.102 → 7.0.104
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.
- package/froth_configs/commonhook.js +29 -31
- package/package.json +3 -3
|
@@ -145,7 +145,35 @@ const commonHooks = {
|
|
|
145
145
|
console.log('🟡 Raw Capabilities (Before):');
|
|
146
146
|
console.log(JSON.stringify(capabilities, null, 2));
|
|
147
147
|
/** 2️⃣ BrowserStack capability normalization */
|
|
148
|
-
|
|
148
|
+
|
|
149
|
+
if (process.env.PLATFORM === 'browserstack' || process.env.PLATFORM === 'browserstacklocal') {
|
|
150
|
+
|
|
151
|
+
const bsOpts = capabilities['bstack:options'] || {};
|
|
152
|
+
/** 🔍 Print existing BS options */
|
|
153
|
+
console.log('🟢 Existing bstack:options (Before Modification):');
|
|
154
|
+
console.log(JSON.stringify(bsOpts, null, 2));
|
|
155
|
+
|
|
156
|
+
if (process.env.BS_SESSION_TYPE === 'app-automate') {
|
|
157
|
+
const appPath = process.env.BROWSERSTACK_APP_PATH;
|
|
158
|
+
if (!appPath) {
|
|
159
|
+
await failExecution('BROWSERSTACK_APP_PATH is missing');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
bsOpts.app = appPath;
|
|
163
|
+
capabilities['appium:app'] = appPath;
|
|
164
|
+
|
|
165
|
+
console.log('✅ App & media set in before session');
|
|
166
|
+
|
|
167
|
+
if (capabilities.platformName === 'android') {
|
|
168
|
+
capabilities['appium:autoGrantPermissions'] = true;
|
|
169
|
+
// capabilities['appium:autoGrantPermissions'] = bsCaps.autoGrantPermissions;
|
|
170
|
+
}
|
|
171
|
+
else
|
|
172
|
+
capabilities['autoAcceptAlerts'] = true;
|
|
173
|
+
|
|
174
|
+
}
|
|
175
|
+
// console.log("Config deatils :" + JSON.stringify(config, null, 2));
|
|
176
|
+
}
|
|
149
177
|
console.log('🔎 Final capabilities:', JSON.stringify(capabilities, null, 2));
|
|
150
178
|
|
|
151
179
|
} catch (error) {
|
|
@@ -368,35 +396,5 @@ async function validateSyntax(specs) {
|
|
|
368
396
|
async function setBrowseratckSession(capabilities) {
|
|
369
397
|
|
|
370
398
|
|
|
371
|
-
if (process.env.PLATFORM !== 'browserstack' || process.env.PLATFORM !== 'browserstacklocal') {
|
|
372
|
-
return capabilities;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
const bsOpts = capabilities['bstack:options'] || {};
|
|
376
|
-
/** 🔍 Print existing BS options */
|
|
377
|
-
console.log('🟢 Existing bstack:options (Before Modification):');
|
|
378
|
-
console.log(JSON.stringify(bsOpts, null, 2));
|
|
379
|
-
|
|
380
|
-
if (process.env.BS_SESSION_TYPE === 'app-automate') {
|
|
381
|
-
const appPath = process.env.BROWSERSTACK_APP_PATH;
|
|
382
|
-
if (!appPath) {
|
|
383
|
-
await failExecution('BROWSERSTACK_APP_PATH is missing');
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
bsOpts.app = appPath;
|
|
387
|
-
capabilities['appium:app'] = appPath;
|
|
388
|
-
|
|
389
|
-
console.log('✅ App & media set in before session');
|
|
390
|
-
|
|
391
|
-
if (capabilities.platformName === 'android') {
|
|
392
|
-
capabilities['appium:autoGrantPermissions'] = true;
|
|
393
|
-
// capabilities['appium:autoGrantPermissions'] = bsCaps.autoGrantPermissions;
|
|
394
|
-
}
|
|
395
|
-
else
|
|
396
|
-
capabilities['autoAcceptAlerts'] = true;
|
|
397
|
-
|
|
398
|
-
return capabilities
|
|
399
|
-
// console.log("Config deatils :" + JSON.stringify(config, null, 2));
|
|
400
|
-
}
|
|
401
399
|
}
|
|
402
400
|
module.exports = commonHooks;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "froth-webdriverio-framework",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.104",
|
|
4
4
|
"readme": "WebdriverIO Integration",
|
|
5
5
|
"description": "WebdriverIO and BrowserStack App Automate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"chai": "^6.2.2",
|
|
40
40
|
"crypto-js": "^4.2.0",
|
|
41
41
|
"deepmerge": "^4.3.1",
|
|
42
|
+
"expect-webdriverio": "^5.6.2",
|
|
42
43
|
"express": "^5.2.1",
|
|
43
44
|
"form-data": "^4.0.5",
|
|
44
45
|
"fs": "^0.0.1-security",
|
|
@@ -48,7 +49,6 @@
|
|
|
48
49
|
"node-localstorage": "^3.0.5",
|
|
49
50
|
"randexp": "^0.5.3",
|
|
50
51
|
"ts-node": "^10.9.2",
|
|
51
|
-
"typescript": "^5.9.3"
|
|
52
|
-
"vm": "^0.1.0"
|
|
52
|
+
"typescript": "^5.9.3"
|
|
53
53
|
}
|
|
54
54
|
}
|