froth-webdriverio-framework 3.0.2 → 3.0.4

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.
@@ -2,6 +2,7 @@
2
2
  async function getBSBuildDetails(sessiontype, bs_username, bs_pwd) {
3
3
  try {
4
4
  // const sessionId = sessionIdd;
5
+ console.log("sessiontype:"+sessiontype)
5
6
  const username = bs_username;
6
7
  const accessKey = bs_pwd;
7
8
  const basicAuth = btoa(`${username}:${accessKey}`);
@@ -31,7 +31,7 @@ async function getDbDetails(frothUrl, token, id) {
31
31
  }
32
32
  else {
33
33
  const errorText = await response.text();
34
- console.error(`Data fetch failed response: ${response.status}`);
34
+ console.error(`Data fetch failed response in getDbDetails: ${response.status}`);
35
35
  // throw new Error(`HTTP error! status: ${response.status}`);
36
36
  }
37
37
 
@@ -37,7 +37,7 @@ async function getExecuitonDetails(frothUrl, token, id) {
37
37
  return getExecuitonDetails(frothUrl, newToken, id);
38
38
  } else {
39
39
  const errorText = await response.text();
40
- console.error(`Data fetch failed response: ${response.status}`);
40
+ console.error(`Data fetch failed response in getExecuitonDetails: ${response.status}`);
41
41
  // throw new Error(`HTTP error! status: ${response.status}`);
42
42
  }
43
43
 
@@ -83,7 +83,7 @@ async function getExecuitonScriptDetails(frothUrl, token, execution_id, script_i
83
83
  return getExecuitonScriptDetails(frothUrl, newToken, execution_id, script_id);
84
84
  } else {
85
85
  const errorText = await response.text();
86
- console.error(`Data fetch failed response: ${response.status}`);
86
+ console.error(`Data fetch failed response in getExecuitonScriptDetails: ${response.status}`);
87
87
  // throw new Error(`HTTP error! status: ${response.status}`);
88
88
  }
89
89
 
@@ -35,7 +35,7 @@ async function getintegrationdetails(frothUrl, token, id) {
35
35
  }
36
36
  else {
37
37
  const errorText = await response.text();
38
- console.error('Data fetch failed response:', errorText);
38
+ console.error('Data fetch failed response in getintegrationdetails:', errorText);
39
39
  throw new Error(`HTTP error! status: ${response.status}`);
40
40
  }
41
41
 
@@ -45,7 +45,7 @@ async function getSuiteDetails(frothUrl, token, id) {
45
45
  }
46
46
  else {
47
47
  const errorText = await response.text();
48
- console.error(`Data fetch failed response: ${response.status}`);
48
+ console.error(`Data fetch failed response in getSuiteDetails: ${response.status}`);
49
49
  // throw new Error(`HTTP error! status: ${response.status}`);
50
50
  }
51
51
 
@@ -42,7 +42,7 @@ async function getDataById(frothUrl, token, id) {
42
42
  else {
43
43
  const errorText = await response.text();
44
44
  // console.error('Data fetch failed response:', errorText);
45
- console.error(`Data fetch failed response: ${response.status}`);
45
+ console.error(`Data fetch failed response in getDataById: ${response.status}`);
46
46
  // throw new Error(`HTTP error! status: ${response.status}`);
47
47
  }
48
48
 
@@ -4,73 +4,73 @@ const commonmobileconfig = require('./common.mobile.conf');
4
4
  const apiconfig = deepmerge.all([commonmobileconfig, {
5
5
 
6
6
 
7
- services: [
8
- ['browserstack', {
7
+ services: [
8
+ ['browserstack', {
9
9
 
10
- browserstackLocal: process.env.BROWSERSTACK_LOCAL || false,
11
- opts: {
12
- forcelocal: false,
13
- // localIdentifier: "webdriverio-appium"
14
- },
10
+ browserstackLocal: process.env.BROWSERSTACK_LOCAL || false,
11
+ opts: {
12
+ forcelocal: false,
13
+ // localIdentifier: "webdriverio-appium"
14
+ },
15
15
 
16
- }]
17
- ],
18
- // ====================
19
- // Capabilities
20
- // ====================
21
- capabilities: [
22
- {
23
- 'bstack:options': {
24
- projectName: process.env.PROJECTNAME || "roboticodigital",
16
+ }]
17
+ ],
18
+ // ====================
19
+ // Capabilities
20
+ // ====================
21
+ capabilities: [
22
+ {
23
+ 'bstack:options': {
24
+ projectName: process.env.PROJECTNAME || "roboticodigital",
25
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
- ],
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
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
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
48
 
49
- // ====================
50
- // Framework
51
- // ====================
52
- // framework: 'mocha', // Use the Mocha framework
53
- // reporters: ['spec'
49
+ // ====================
50
+ // Framework
51
+ // ====================
52
+ // framework: 'mocha', // Use the Mocha framework
53
+ // reporters: ['spec'
54
54
 
55
- // ], // Use the spec reporter
55
+ // ], // Use the spec reporter
56
56
 
57
- // ====================
58
- // Hooks
59
- // ====================
60
- before: function (capabilities, specs) {
61
- browser.maximizeWindow()
62
- process.env.BS_SESSION_TYPE = "automate";
63
- },
57
+ // ====================
58
+ // Hooks
59
+ // ====================
60
+ before: function (capabilities, specs) {
61
+ browser.maximizeWindow()
62
+ process.env.BS_SESSION_TYPE = "automate";
63
+ },
64
64
 
65
65
 
66
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
- // },
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
74
  }]);
75
75
 
76
76
  module.exports = apiconfig;
@@ -3,7 +3,7 @@ const commonconfig = require('./commonconfig');
3
3
  const isBrowserStackEnabled = process.env.BROWSERSTACK;
4
4
  console.log("isBrowserStackEnabled", isBrowserStackEnabled);
5
5
 
6
- const browserStackConfig = isBrowserStackEnabled === true ? {
6
+ const browserStackConfig = {
7
7
  user: process.env.BROWSERSTACK_USERNAME,
8
8
  key: Buffer.from(process.env.BROWSERSTACK_ACCESS_KEY, 'base64').toString('utf-8'),
9
9
  commonCapabilities: {
@@ -14,7 +14,7 @@ const browserStackConfig = isBrowserStackEnabled === true ? {
14
14
  networkLogs: true
15
15
  }
16
16
  }
17
- } : {};
17
+ } ;
18
18
 
19
19
  const commonmobconfig = deepmerge.all([
20
20
  commonconfig,
@@ -36,7 +36,8 @@ const commonconfig = {
36
36
 
37
37
  // const sessionId = browser.sessionId;
38
38
  // BUFFER.setItem("SESSION_ID", sessionId)
39
- if (isBrowserStackEnabled) {
39
+ if (isBrowserStackEnabled === true) {
40
+ console.log("BrowserStack is enabled");
40
41
  await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
41
42
  }
42
43
  const resultdetails = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",