froth-webdriverio-framework 4.0.70 → 4.0.71

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.
@@ -88,10 +88,10 @@ const commonconfig = {
88
88
  resultdetails.comments.push("BROWSERSTACK_APP_PATH is not defined or empty.");
89
89
  await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails);
90
90
  process.exit(1); // Stop execution if app path is not set
91
- }else{
91
+ } else {
92
92
  console.log("App Path:", capabilities.app);
93
93
  console.log("Browserstack Local:", capabilities.browserstackLocal);
94
- }
94
+ }
95
95
  }
96
96
 
97
97
  try {
@@ -145,6 +145,17 @@ const commonconfig = {
145
145
  console.log("Error in beforeSuite:", e);
146
146
  }
147
147
  },
148
+
149
+ before: async function (capabilities, specs) {
150
+ if (capabilities.platformName === 'web') {
151
+ console.log('==== BEFORE HOOK ====')
152
+ await browser.maximizeWindow()
153
+ }
154
+ else {
155
+ console.log('==== BEFORE HOOK FOR MOBILE ====');
156
+ }
157
+
158
+ },
148
159
 
149
160
  /**
150
161
  * Function to be executed before a test (in Mocha/Jasmine only)
@@ -89,7 +89,6 @@ function setupPrerequisites() {
89
89
  process.env.BROWSERSTACK_ACCESS_KEY = capabilities.accessKey
90
90
 
91
91
  console.log('capabilities.platformName:', capabilities.platformName ?? 'web');
92
-
93
92
  process.env.BS_SESSION_TYPE = capabilities.platformName === 'android' || capabilities.platformName === 'ios' ? 'app-automate' : 'automate';
94
93
  capabilities.buildName = process.env.FROTH_TESTOPS_BUILD_NAME;
95
94
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "4.0.70",
3
+ "version": "4.0.71",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",