froth-webdriverio-framework 6.0.4 → 6.0.6

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.
@@ -45,6 +45,7 @@ const commonconfig = {
45
45
  beforeSession: async function (config, capabilities, specs) {
46
46
  try {
47
47
  let syntaxFailed = false;
48
+ console.log("DEBUG: bstack:options →", capabilities['bstack:options']);
48
49
 
49
50
  console.log('==== BEFORE SESSION HOOK ====');
50
51
  // Perform any setup or pre-test actions here
@@ -81,34 +82,36 @@ const commonconfig = {
81
82
  if (process.env.PLATFORM === 'browserstack') {
82
83
  /// console.log("capabilities:", capabilities);
83
84
  console.log("====> BROWSERSTACK_LOCAL : " + process.env.BROWSERSTACK_LOCAL);
84
- const isLocalEnabled = process.env.BROWSERSTACK_LOCAL === "true";
85
-
86
- if (isLocalEnabled) {
87
- bsLocal = new browserstack.Local();
88
- const localArgs = {
89
- key: process.env.BROWSERSTACK_ACCESS_KEY,
90
- forceLocal: true,
91
- localIdentifier: capabilities.localIdentifier || 'wdioLocal'
92
- };
93
-
94
- await new Promise((resolve, reject) => {
95
- bsLocal.start(localArgs, function (error) {
96
- if (error) return reject(error);
97
- console.log("====> BrowserStack Local started successfully.");
98
- resolve();
99
- });
100
- });
101
-
102
- // Add Local settings into capabilities dynamically
103
- capabilities['browserstack.local'] = true;
104
- capabilities['browserstack.localIdentifier'] = localArgs.localIdentifier || 'ExecuteLocal';
105
- }
106
- else {
107
- console.log("====> BROWSERSTACK_LOCAL not set. Skipping BrowserStack Local startup." + process.env.BROWSERSTACK_LOCAL);
108
- // Make sure no stale values from config remain
109
- delete capabilities['browserstack.local'];
110
- delete capabilities['browserstack.localIdentifier'];
111
- }
85
+ console.log("Local enabled? ", capabilities['bstack:options']?.local);
86
+
87
+ // const isLocalEnabled = process.env.BROWSERSTACK_LOCAL === "true";
88
+
89
+ // if (isLocalEnabled) {
90
+ // bsLocal = new browserstack.Local();
91
+ // const localArgs = {
92
+ // key: process.env.BROWSERSTACK_ACCESS_KEY,
93
+ // forceLocal: true,
94
+ // localIdentifier: capabilities.localIdentifier || 'wdioLocal'
95
+ // };
96
+
97
+ // await new Promise((resolve, reject) => {
98
+ // bsLocal.start(localArgs, function (error) {
99
+ // if (error) return reject(error);
100
+ // console.log("====> BrowserStack Local started successfully.");
101
+ // resolve();
102
+ // });
103
+ // });
104
+
105
+ // // Add Local settings into capabilities dynamically
106
+ // capabilities['browserstack.local'] = true;
107
+ // capabilities['browserstack.localIdentifier'] = localArgs.localIdentifier || 'ExecuteLocal';
108
+ // }
109
+ // else {
110
+ // console.log("====> BROWSERSTACK_LOCAL not set. Skipping BrowserStack Local startup." + process.env.BROWSERSTACK_LOCAL);
111
+ // // Make sure no stale values from config remain
112
+ // delete capabilities['browserstack.local'];
113
+ // delete capabilities['browserstack.localIdentifier'];
114
+ // }
112
115
 
113
116
  // capabilities.accessKey = Buffer.from(capabilities.accessKey, 'base64').toString('utf-8');
114
117
  if (capabilities.platformName === 'android' || capabilities.platformName === 'ios') {
@@ -127,6 +127,7 @@ function normalizeCapabilities(rawCaps, sessionType, platform) {
127
127
  consoleLogs: rawCaps.consoleLogs,
128
128
  networkLogs: rawCaps.networkLogs,
129
129
  debug: rawCaps.debug,
130
+ interactiveDebugging: rawCaps.interactiveDebugging,
130
131
  buildIdentifier: rawCaps.buildIdentifier,
131
132
  // userName: rawCaps.userName,
132
133
  // accessKey: process.env.BROWSERSTACK_ACCESS_KEY
@@ -144,7 +145,7 @@ function normalizeCapabilities(rawCaps, sessionType, platform) {
144
145
  'appium:deviceOrientation': rawCaps.deviceOrientation,
145
146
  'appium:app': rawCaps.app || "",
146
147
  'bstack:options': {
147
- appProfiling: rawCaps.appProfiling,
148
+ // appProfiling: rawCaps.appProfiling,
148
149
  networkLogs: rawCaps.networkLogs,
149
150
  debug: rawCaps.debug,
150
151
  interactiveDebugging: rawCaps.interactiveDebugging,
@@ -169,7 +170,7 @@ exports.config = deepmerge(commonconfig,
169
170
  // debug: true,
170
171
  // execArgv: ['--inspect-brk'],
171
172
  services: PLATFORM === 'browserstack'
172
- ? ['browserstack']
173
+ ? ['browserstack', { browserstackLocal: false }]
173
174
  : PLATFORM === 'saucelabs'
174
175
  ? ['sauce']
175
176
  : [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "6.0.4",
3
+ "version": "6.0.6",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",