froth-webdriverio-framework 3.0.89 → 3.0.90

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.
Files changed (31) hide show
  1. package/{api → froth_api_calls}/browsersatckSessionInfo.js +8 -4
  2. package/{api → froth_api_calls}/getexecutionDetails.js +15 -12
  3. package/{api → froth_api_calls}/getsuiteDetails.js +9 -9
  4. package/{api → froth_api_calls}/readTestdata.js +1 -1
  5. package/{commonMethods → froth_common_actions}/Utils.js +21 -9
  6. package/{commonMethods → froth_common_actions}/alert.js +3 -3
  7. package/{commonMethods → froth_common_actions}/apicall.js +17 -5
  8. package/{commonMethods → froth_common_actions}/click.js +24 -1
  9. package/{commonMethods → froth_common_actions}/jwt.js +3 -3
  10. package/{commonMethods → froth_common_actions}/scroll.js +23 -1
  11. package/froth_common_actions/swipe.js +193 -0
  12. package/{config → froth_configs}/commonconfig.js +41 -31
  13. package/{config → froth_configs}/setallDatailinBuffer.js +8 -5
  14. package/froth_configs/wdio.common.conf.js +66 -0
  15. package/package.json +5 -6
  16. package/.github/workflows/main.yml +0 -23
  17. package/commonMethods/swipe.js +0 -59
  18. package/config/android.conf.js +0 -49
  19. package/config/api.conf.bs.js +0 -76
  20. package/config/api.conf.js +0 -77
  21. package/config/common.mobile.conf.js +0 -45
  22. package/config/injectimage.js +0 -4
  23. package/config/ios.conf.js +0 -47
  24. package/config/web.conf.bs.js +0 -76
  25. package/config/web.conf.js +0 -70
  26. /package/{api → froth_api_calls}/aesEncryption.js +0 -0
  27. /package/{api → froth_api_calls}/loginapi.js +0 -0
  28. /package/{commonMethods → froth_common_actions}/assert.js +0 -0
  29. /package/{commonMethods → froth_common_actions}/dropDown.js +0 -0
  30. /package/{commonMethods → froth_common_actions}/random.js +0 -0
  31. /package/{commonMethods → froth_common_actions}/storeToBuffer.js +0 -0
@@ -1,11 +1,11 @@
1
- const setAllDetails = require("./setallDatailinBuffer")
1
+ const path = require('path');
2
2
  const { LocalStorage } = require('node-localstorage');
3
3
  global.BUFFER = new LocalStorage('./storage');
4
- const path = require('path');
5
- const exeDetails = require("../api/getexecutionDetails")
6
- const getBSSessionDetails = require("../api/browsersatckSessionInfo").getBSSessionDetails;
4
+ const setAllDetails = require("./setallDatailinBuffer")
5
+ const exeDetails = require("../froth_api_calls/getexecutionDetails")
6
+ const getBSSessionDetails = require("../froth_api_calls/browsersatckSessionInfo").getBSSessionDetails;
7
7
  const { fail } = require("assert");
8
- const isBrowserStackEnabled = process.env.BROWSERSTACK;
8
+ //const isBrowserStackEnabled = process.env.BROWSERSTACK;
9
9
  let starttime;
10
10
  let endtime;
11
11
 
@@ -14,32 +14,43 @@ const commonconfig = {
14
14
 
15
15
 
16
16
  onPrepare: async function (capabilities, specs) {
17
- try{
18
- // This code runs before the test suite starts
19
- await setAllDetails.setEnvVariables();
20
- await setAllDetails.setLoginToken();
21
- await setAllDetails.setExecutionDetails();
22
- // await setAllDetails.setIntegrationsDetails();
23
- await setAllDetails.setSuiteDetails();
24
- await setAllDetails.setTestDataDetails();
25
- // console.log(JSON.stringify(capabilities))
26
- // console.log("ALL JSON DATA in env variable :" + JSON.stringify(process.env));
27
- }catch(e){
28
- console.log("====> Error in onPrepare:",e);
17
+ try {
18
+ console.log('====> This is the onPrepare hook');
19
+ // This code runs before the test suite starts
20
+ await setAllDetails.setEnvVariables();
21
+ await setAllDetails.setLoginToken();
22
+ const getExeDetails = await setAllDetails.setExecutionDetails();
23
+
24
+ // await setAllDetails.setIntegrationsDetails();
25
+ await setAllDetails.setSuiteDetails();
26
+ await setAllDetails.setTestDataDetails();
27
+ console.log("on prepare:", JSON.stringify(capabilities))
28
+ // console.log("ALL JSON DATA in env variable :" + JSON.stringify(process.env));
29
+ } catch (e) {
30
+ console.log("====> Error in onPrepare:", e);
29
31
 
30
32
  }
31
33
  },
32
34
 
33
35
 
34
- beforeSession: async function (config, capabilities,specs ) {
36
+ beforeSession: async function (config, capabilities, specs) {
35
37
  console.log('====> This is the beforesession hook');
36
38
  // Perform any setup or pre-test actions here
37
- // console.log("Capabilities:", capabilities);
38
- console.log("Specs:", specs.length);
39
- const specdat=specs
40
- console.log("specdat:", specdat);
41
- console.log("length:", specdat.length);
42
- // console.log("Config:", config);
39
+ // console.log("Capabilities:", capabilities);
40
+
41
+ console.log("specdat:", specs);
42
+ console.log("length:", specs.length);
43
+
44
+ if (process.env.PLATFORM === 'browserstack') {
45
+ /// console.log("capabilities:", capabilities);
46
+ capabilities.app = process.env.BROWSERSTACK_APP_PATH;
47
+ capabilities.browserstackLocal = process.env.BROWSERSTACK_LOCAL;
48
+ if (process.env.MEDIA_FILES)
49
+ capabilities['browserstack.uploadMedia'] = process.env.MEDIA_FILES;
50
+
51
+ console.log(`Running tests on after app,bslocal,mediafiles: ${capabilities}`);
52
+ }
53
+
43
54
  },
44
55
  /**
45
56
  * Gets executed before the suite starts (in Mocha/Jasmine only).
@@ -51,10 +62,9 @@ const commonconfig = {
51
62
 
52
63
  starttime = new Date().getTime();
53
64
 
54
- if (isBrowserStackEnabled) {
55
- console.log("BrowserStack is enabled");
65
+ if (process.env.PLATFORM === 'browserstack')
56
66
  await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
57
- }
67
+
58
68
  const resultdetails = {};
59
69
  exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
60
70
 
@@ -108,7 +118,7 @@ const commonconfig = {
108
118
  // scriptresult = "FAILED"
109
119
  }
110
120
  let scriptid = BUFFER.getItem(fileName.replace(".js", ""))
111
- let script_platform = BUFFER.getItem(fileName.replace(".js", "")+"_PLATFORM")
121
+ let script_platform = BUFFER.getItem(fileName.replace(".js", "") + "_PLATFORM")
112
122
 
113
123
  await exeDetails.updateScriptExecutionStatus(
114
124
  BUFFER.getItem("ORGANISATION_DOMAIN_URL"),
@@ -151,7 +161,7 @@ const commonconfig = {
151
161
  afterSession: async function (config, capabilities, specs) {
152
162
  console.log('====> This is the aftersession hook');
153
163
  // Perform any cleanup or post-test actions here
154
- console.log("Capabilities:", capabilities);
164
+ // console.log("Capabilities:", capabilities);
155
165
  console.log("Specs:", specs);
156
166
  console.log("Config:", config);
157
167
 
@@ -159,7 +169,7 @@ const commonconfig = {
159
169
  let totalDuration = endtime - starttime;
160
170
  console.log("====> Total Duration in after session based on start time and end time:" + totalDuration);
161
171
 
162
- if (isBrowserStackEnabled)
172
+ if (process.env.PLATFORM === 'browserstack')
163
173
  await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
164
174
 
165
175
  const resultdetails = {}
@@ -175,7 +185,7 @@ const commonconfig = {
175
185
  },
176
186
 
177
187
  onComplete: async function (exitCode, config, capabilities, results) {
178
-
188
+
179
189
  console.log('====> This is the onComplete hook', results);
180
190
 
181
191
  console.log('====> Test Results Summary ');
@@ -1,8 +1,8 @@
1
- const getLoginToken = require("../api/loginapi");
2
- const exeDetails = require("../api/getexecutionDetails")
3
- //const getintegrationdetails = require("../api/getintegrationDetails");
4
- const getSuiteDetails = require("../api/getsuiteDetails");
5
- const getDataById = require("../api/readTestdata");
1
+ const getLoginToken = require("../froth_api_calls/loginapi");
2
+ const exeDetails = require("../froth_api_calls/getexecutionDetails")
3
+ //const getintegrationdetails = require("../froth_api_calls/getintegrationDetails");
4
+ const getSuiteDetails = require("../froth_api_calls/getsuiteDetails");
5
+ const getDataById = require("../froth_api_calls/readTestdata");
6
6
 
7
7
 
8
8
  async function generateBuildNumber() {
@@ -64,6 +64,9 @@ async function setExecutionDetails() {
64
64
  try {
65
65
  const getExeDetails = await exeDetails.getExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"));
66
66
  BUFFER.setItem("AUTOMATION_SUITE_ID", getExeDetails.automation_suite_id);
67
+ BUFFER.setItem("BROWSERSTACK_LOCAL", getExeDetails.browser_stack_local);
68
+ BUFFER.setItem("BROWSERSTACK_APP_PATH", getExeDetails.app_url);
69
+ BUFFER.setItem("MEDIA_FILES", getExeDetails.mediaurls);
67
70
 
68
71
  } catch (error) {
69
72
  // console.error('Error in main function:', error);
@@ -0,0 +1,66 @@
1
+ const deepmerge = require('deepmerge')
2
+ const fs = require('fs');
3
+ const yaml = require('js-yaml');
4
+ const path = require('path');
5
+ const commonconfig = require('./commonconfig');
6
+
7
+ // Select platform at runtime
8
+ const PLATFORM = process.env.PLATFORM || 'browserstack';
9
+ const configFile = PLATFORM === 'browserstack' ? './ymls/browserstack/' + process.env.YML_NAME : './ymls/saucelab/' + process.env.YML_NAME;
10
+ console.log('PLATFORM:', PLATFORM);
11
+ // Load YAML file
12
+ const capabilities = yaml.load(fs.readFileSync(path.join(path.resolve(process.cwd(),configFile)), 'utf8'));
13
+ const SUITE_FILE = path.resolve(process.cwd(), process.env.SUITE);
14
+
15
+ console.log('SUITE_FILE:', SUITE_FILE);
16
+
17
+ capabilities.buildName = process.env.BROWSERSTACK_BUILD_NAME;
18
+
19
+
20
+ if (PLATFORM === 'browserstack') {
21
+ process.env.BROWSERSTACK_USERNAME = capabilities.userName;
22
+ process.env.BROWSERSTACK_ACCESS_KEY = capabilities.accessKey;
23
+ console.log('capabilities.platformName:', capabilities.platformName);
24
+ process.env.BS_SESSION_TYPE = capabilities.platformName === 'android' || capabilities.platformName === 'ios' ? 'app-automate' : 'automate';
25
+
26
+ }
27
+
28
+ exports.config = deepmerge(commonconfig,
29
+
30
+ {
31
+ user: capabilities.userName,
32
+ key: capabilities.accessKey,
33
+ // debug: true,
34
+ // execArgv: ['--inspect-brk'],
35
+ services: PLATFORM === 'browserstack'
36
+ ? ['browserstack']
37
+ : PLATFORM === 'saucelabs'
38
+ ? ['sauce']
39
+ : [],
40
+
41
+ //runner: 'local',
42
+ specs: require(SUITE_FILE).tests,
43
+
44
+ maxInstances: 1,
45
+ capabilities: [capabilities],
46
+
47
+ logLevel: 'info',
48
+ coloredLogs: true,
49
+ screenshotPath: './errorShots/',
50
+ bail: 0,
51
+ //baseUrl: 'https://example.com',
52
+ waitforTimeout: 90000,
53
+ connectionRetryTimeout: 90000,
54
+ connectionRetryCount: 3,
55
+
56
+ framework: 'mocha',
57
+ reporters: ['spec'],
58
+ maxInstances: 10,
59
+ updateJob: false,
60
+ mochaOpts: {
61
+ ui: 'bdd',
62
+ timeout: 300000
63
+ }
64
+ });
65
+
66
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.89",
3
+ "version": "3.0.90",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",
@@ -31,21 +31,20 @@
31
31
  "@wdio/local-runner": "^9.0.9",
32
32
  "@wdio/mocha-framework": "^8.36.1",
33
33
  "@wdio/spec-reporter": "^8.36.1",
34
- "appium": "^1.22.3",
35
- "appium-uiautomator2-driver": "^2.2.0",
34
+ "appium": "^2.15.0",
35
+ "appium-uiautomator2-driver": "^4.0.1",
36
36
  "assert": "^2.1.0",
37
37
  "axios": "^1.7.7",
38
38
  "browserstack-local": "^1.5.5",
39
39
  "chai": "^5.1.1",
40
- "crypto": "^1.0.1",
41
40
  "crypto-js": "^4.2.0",
42
41
  "deepmerge": "^4.3.1",
43
42
  "form-data": "^4.0.0",
43
+ "fs": "^0.0.1-security",
44
+ "js-yaml": "^4.1.0",
44
45
  "mysql2": "^3.10.2",
45
46
  "node-fetch": "^3.3.2",
46
47
  "node-localstorage": "^3.0.5",
47
- "pg": "^8.12.0",
48
- "pg-promise": "^11.9.0",
49
48
  "randexp": "^0.5.3",
50
49
  "ts-node": "^10.9.2",
51
50
  "typescript": "^5.4.5"
@@ -1,23 +0,0 @@
1
- name: npm_package
2
-
3
- on:
4
- workflow_dispatch:
5
-
6
- jobs:
7
- release:
8
- name: release
9
- runs-on: ubuntu-latest
10
- steps:
11
- - name: Checkout code
12
- uses: actions/checkout@v2
13
- - name: Setup Node.js
14
- uses: actions/setup-node@v2
15
- with:
16
- node-version: '12.x'
17
- registry-url: https://registry.npmjs.org
18
-
19
- - name: Publish to npm
20
- run: npm publish --access public
21
- env:
22
- NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
23
-
@@ -1,59 +0,0 @@
1
- async function swipeleft(selector, xoffset, speedinsec) {
2
- try {
3
- console.log('Swiping left');
4
-
5
- if (xoffset == null) {
6
- driver.swipeLeft(selector, speedinsec);
7
- } else {
8
- driver.swipeLeft(selector, xoffset, speedinsec);
9
- }
10
- } catch (error) {
11
- console.error(error.message);
12
- }
13
-
14
- }
15
-
16
- async function swiperight(selector, xoffset, speedinsec) {
17
- try {
18
- console.log('Swiping right');
19
-
20
- if (xoffset == null) {
21
- driver.swipeRight(selector, speedinsec);
22
- } else {
23
- driver.swipeRight(selector, xoffset, speedinsec);
24
- }
25
- } catch (error) {
26
- console.error(error.message);
27
- }
28
-
29
- }
30
-
31
- async function swipeup(selector, yoffset, speedinsec) {
32
- try {
33
- console.log('Swiping up');
34
-
35
- if (yoffset == null) {
36
- driver.swipeUp(selector, speedinsec);
37
- } else {
38
- driver.swipeUp(selector, yoffset, speedinsec);
39
- }
40
- } catch (error) {
41
- console.error(error.message);
42
- }
43
- }
44
-
45
- async function swipedown(selector, yoffset, speedinsec) {
46
- try {
47
- console.log('Swiping down');
48
-
49
- if (yoffset == null) {
50
- driver.swipeDown(selector, speedinsec);
51
- } else {
52
- driver.swipeDown(selector, yoffset, speedinsec);
53
- }
54
- } catch (error) {
55
- console.error(error.message);
56
- }
57
- }
58
-
59
- module.exports = { swipeleft, swipedown, swiperight, swipeup };
@@ -1,49 +0,0 @@
1
- const deepmerge = require('deepmerge')
2
- process.env.BROWSERSTACK = true;
3
- const commonmobileconfig = require('./common.mobile.conf');
4
-
5
- const androidConfig = deepmerge.all([commonmobileconfig, {
6
- services: [
7
- [
8
- 'browserstack',
9
- {
10
- // testObservability: true,
11
- // buildName: "ANDROID BUILD",
12
- // buildIdentifier: "ANDROID BUILD_" + process.env.BUILD_NUMBER,
13
- browserstackLocal: process.env.BROWSERSTACK_LOCAL || false,
14
- opts: {
15
- forcelocal: false
16
- },
17
- app: process.env.BROWSERSTACK_APP_PATH
18
- }
19
- ]
20
- ],
21
-
22
- capabilities: [{
23
- 'bstack:options': {
24
- projectName: process.env.PROJECTNAME || "roboticodigital",
25
-
26
- deviceName: process.env.DEVICENAME || 'Samsung Galaxy S23 Ultra',
27
- platformVersion: process.env.OSVERSION || '13.0',
28
- platformName: 'android',
29
- interactiveDebugging: true,
30
- buildName: process.env.BROWSERSTACK_BUILD_NAME || 'Android_Build',
31
- networkLogs: "true",
32
- debug: "true",
33
- appProfiling: "true",
34
- //enableCameraImageInjection: true,
35
- // enableCameraVideoInjection: true,
36
- deviceOrientation: process.env.DEVICENAME.toLowerCase().includes('tab') ? 'landscape' : 'portrait',
37
- }
38
- }],
39
- before: function (capabilities, specs) {
40
- process.env.BS_SESSION_TYPE = "app-automate";
41
- },
42
-
43
- }]);
44
-
45
-
46
-
47
- module.exports = androidConfig;
48
-
49
-
@@ -1,76 +0,0 @@
1
- const deepmerge = require('deepmerge')
2
- const commonmobileconfig = require('./common.mobile.conf');
3
-
4
- const apiconfig = deepmerge.all([commonmobileconfig, {
5
-
6
-
7
- services: [
8
- ['browserstack', {
9
-
10
- browserstackLocal: process.env.BROWSERSTACK_LOCAL || false,
11
- opts: {
12
- forcelocal: false,
13
- // localIdentifier: "webdriverio-appium"
14
- },
15
-
16
- }]
17
- ],
18
- // ====================
19
- // Capabilities
20
- // ====================
21
- capabilities: [
22
- {
23
- 'bstack:options': {
24
- projectName: process.env.PROJECTNAME || "roboticodigital",
25
-
26
- browserName: process.env.BROWSERSTACK_BROWSER || 'chrome', // Choose the browser you want to test
27
- browserVersion: process.env.BROWSERSTACK_BROWSER_VERSION || '129', // Specify the browser version
28
- os: 'Windows', // Specify the operating system
29
- os_version: '10', // Specify the operating system version
30
- interactiveDebugging: true,
31
- buildName: process.env.BROWSERSTACK_BUILD_NAME || 'WEB_Build',
32
- networkLogs: "true",
33
- debug: "true",
34
- }
35
- },
36
- // Add more capabilities for other browsers or devices as needed
37
- ],
38
-
39
- // ====================
40
- // Test Configurations
41
- // ====================
42
- // logLevel: 'info', // Set the log level
43
- // bail: 0, // Set to 1 to stop the test suite after the first test failure
44
- // baseUrl: '', // Specify the base URL of your application
45
- // waitforTimeout: 90000, // Set the timeout for all waitFor* commands
46
- // connectionRetryTimeout: 90000, // Set the timeout in milliseconds for test retries
47
- // connectionRetryCount: 2, // Set the number of times to retry the entire spec file
48
-
49
- // ====================
50
- // Framework
51
- // ====================
52
- // framework: 'mocha', // Use the Mocha framework
53
- // reporters: ['spec'
54
-
55
- // ], // Use the spec reporter
56
-
57
- // ====================
58
- // Hooks
59
- // ====================
60
- before: function (capabilities, specs) {
61
- browser.maximizeWindow()
62
- process.env.BS_SESSION_TYPE = "automate";
63
- },
64
-
65
-
66
-
67
- // // ====================
68
- // // Mocha Options
69
- // // ====================
70
- // mochaOpts: {
71
- // ui: 'bdd', // Set the test interface to BDD
72
- // timeout: 90000, // Set the timeout for test cases in milliseconds
73
- // },
74
- }]);
75
-
76
- module.exports = apiconfig;
@@ -1,77 +0,0 @@
1
- const deepmerge = require('deepmerge')
2
- process.env.BROWSERSTACK = true;
3
- const commonmobileconfig = require('./common.mobile.conf');
4
-
5
- const apiconfig = deepmerge.all([commonmobileconfig, {
6
-
7
-
8
- services: [
9
- ['browserstack', {
10
-
11
- browserstackLocal: process.env.BROWSERSTACK_LOCAL || false,
12
- opts: {
13
- forcelocal: false,
14
- // localIdentifier: "webdriverio-appium"
15
- },
16
-
17
- }]
18
- ],
19
- // ====================
20
- // Capabilities
21
- // ====================
22
- capabilities: [
23
- {
24
- 'bstack:options': {
25
- projectName: process.env.PROJECTNAME || "roboticodigital",
26
-
27
- browserName: 'chrome', // Choose the browser you want to test
28
- // browserVersion: '129', // Specify the browser version
29
- os: 'Windows', // Specify the operating system
30
- // os_version: '10', // Specify the operating system version
31
- interactiveDebugging: true,
32
- buildName: process.env.BROWSERSTACK_BUILD_NAME || 'WEB_Build',
33
- networkLogs: "true",
34
- debug: "true",
35
- }
36
- },
37
- // Add more capabilities for other browsers or devices as needed
38
- ],
39
-
40
- // ====================
41
- // Test Configurations
42
- // ====================
43
- // logLevel: 'info', // Set the log level
44
- // bail: 0, // Set to 1 to stop the test suite after the first test failure
45
- // baseUrl: '', // Specify the base URL of your application
46
- // waitforTimeout: 90000, // Set the timeout for all waitFor* commands
47
- // connectionRetryTimeout: 90000, // Set the timeout in milliseconds for test retries
48
- // connectionRetryCount: 2, // Set the number of times to retry the entire spec file
49
-
50
- // ====================
51
- // Framework
52
- // ====================
53
- // framework: 'mocha', // Use the Mocha framework
54
- // reporters: ['spec'
55
-
56
- // ], // Use the spec reporter
57
-
58
- // ====================
59
- // Hooks
60
- // ====================
61
- before: function (capabilities, specs) {
62
- browser.maximizeWindow()
63
- process.env.BS_SESSION_TYPE = "automate";
64
- },
65
-
66
-
67
-
68
- // // ====================
69
- // // Mocha Options
70
- // // ====================
71
- // mochaOpts: {
72
- // ui: 'bdd', // Set the test interface to BDD
73
- // timeout: 90000, // Set the timeout for test cases in milliseconds
74
- // },
75
- }]);
76
-
77
- module.exports = apiconfig;
@@ -1,45 +0,0 @@
1
- const deepmerge = require('deepmerge')
2
- const commonconfig = require('./commonconfig');
3
- const isBrowserStackEnabled = process.env.BROWSERSTACK;
4
- console.log("isBrowserStackEnabled", isBrowserStackEnabled);
5
-
6
- const browserStackConfig = isBrowserStackEnabled === 'true' ? {
7
- user: process.env.BROWSERSTACK_USERNAME,
8
- key: Buffer.from(process.env.BROWSERSTACK_ACCESS_KEY, 'base64').toString('utf-8'),
9
- commonCapabilities: {
10
- 'bstack:options': {
11
- projectName: process.env.PROJECTNAME || "roboticodigital",
12
- sessionName: 'Automation test session',
13
- debug: true,
14
- networkLogs: true
15
- }
16
- }
17
- }: {};
18
-
19
- const commonmobconfig = deepmerge.all([
20
-
21
- {
22
- logLevel: 'info',
23
- coloredLogs: true,
24
- screenshotPath: './errorShots/',
25
- baseUrl: '',
26
- waitforTimeout: 90000,
27
- connectionRetryTimeout: 90000,
28
- connectionRetryCount: 2,
29
-
30
- framework: 'mocha',
31
- mochaOpts: {
32
- ui: 'bdd',
33
- timeout: 300000
34
- },
35
-
36
- maxInstances: 10,
37
-
38
- updateJob: false,
39
- reporters: ['spec'],
40
- },
41
- browserStackConfig,
42
- commonconfig,
43
- ]);
44
-
45
- module.exports = commonmobconfig;
@@ -1,4 +0,0 @@
1
-
2
- await driver.execute('browserstack_executor: {"action":"cameraImageInjection", "arguments": {"imageUrl" : "media://1965674f959d00128d4fb649dcc6823bd00b00cb"}}');
3
-
4
- await driver.execute('browserstack_executor: {"action":"cameraVideoInjection", "arguments": {"videoUrl" : "media://1920c80136e1c7e2278e15d820845ed64a676e92"}}')
@@ -1,47 +0,0 @@
1
- // This is the configuration file for iOS devices
2
- const deepmerge = require('deepmerge')
3
- process.env.BROWSERSTACK = true;
4
- const commonmobileconfig = require('./common.mobile.conf');
5
-
6
- const iosconfig = deepmerge.all([commonmobileconfig, {
7
- services: [
8
- [
9
- 'browserstack',
10
- {
11
- // testObservability: true,
12
- // buildIdentifier: `#${process.env.BUILD_NUMBER}`,
13
- browserstackLocal: process.env.BROWSERSTACK_LOCAL || false,
14
- opts: {
15
- forcelocal: false,
16
- // localIdentifier: "webdriverio-appium"
17
- },
18
- app: process.env.BROWSERSTACK_APP_PATH || 'bs://d6588d0899a2ac5c485d4784af9ad28d06b98c44'
19
- }
20
- ]
21
- ],
22
-
23
- capabilities: [{
24
- 'bstack:options': {
25
- projectName: process.env.PROJECTNAME || "roboticodigital",
26
- deviceName: process.env.DEVICENAME || "iPhone 15 Pro Max",
27
- osVersion: process.env.OSVERSION || "17",
28
- platformName: 'iOS',
29
- interactiveDebugging: true,
30
- buildName: process.env.BROWSERSTACK_BUILD_NAME || 'IOS_Build',
31
- networkLogs: "true",
32
- debug: "true",
33
- appProfiling: "true",
34
- //enableCameraImageInjection: "true",
35
- deviceOrientation: process.env.DEVICENAME.toLowerCase().includes('tab') ? 'landscape' : 'portrait',
36
-
37
- }
38
- }],
39
-
40
- before: function (capabilities, specs) {
41
- // browser.maximizeWindow()
42
- process.env.BS_SESSION_TYPE = "app-automate";
43
- },
44
- }]);
45
-
46
- module.exports = iosconfig;
47
-