froth-webdriverio-framework 1.0.15 → 1.0.16

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.
@@ -54,8 +54,30 @@ async function getDataById(frothUrl, token, id) {
54
54
  }
55
55
 
56
56
  }
57
- module.exports = getDataById;
57
+
58
58
 
59
59
  // Execute the main function
60
+ async function main() {
61
+ try {
62
+ const frothUrl = "devapi.frothtestops.com";
63
+ const username = "subhra.subudhi@roboticodigital.com";
64
+ const password = "V2VsY29tZUAxMjM=";
65
+
66
+ const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzE4ODk2NjMzLCJpYXQiOjE3MTg4OTMwMzMsImp0aSI6ImM2NDJlODk3NDI5MjQ1YTliN2E1YmYyYWEzOTMwYjY4IiwidXNlcl9pZCI6MTk0fQ.Om2kXmuhquY1xooCXWacyArCezff2B4qu_joTStyhsA"
67
+ // if (!token) {
68
+ // throw new Error('Login failed, no token obtained');
69
+ // }
70
+
71
+ const id = 94;
72
+ // const data = await getExecuitonDetails(frothUrl, token, id);
73
+ // console.log("Retrieved JSON Data:", data);
74
+
75
+ await getDataById(frothUrl, token, id);
76
+ } catch (error) {
77
+ console.error('Error in main function:', error);
78
+ }
79
+ }
80
+
81
+ main();
60
82
 
61
- //console.log("Retrieved JSON Data from local storage:", getDataById("devapi.frothtestops.com", 78, "asdfa"));
83
+ module.exports = getDataById;
@@ -1,4 +1,6 @@
1
1
  const setAllDetails = require("./setallDatailinBuffer")
2
+ const { LocalStorage } = require('node-localstorage');
3
+ global.BUFFER = new LocalStorage('./storage');
2
4
 
3
5
  const getBSSessionDetails = require("../api/browsersatckSessionInfo")
4
6
  // Description: This file contains the common configuration for the webdriverio framework.
@@ -4,8 +4,6 @@ const getintegrationdetails = require("../api/getintegrationDetails");
4
4
  const getLoginToken = require("../api/loginapi");
5
5
  const getSuiteDetails = require("../api/getsuiteDetails");
6
6
 
7
- const { LocalStorage } = require('node-localstorage');
8
- global.BUFFER = new LocalStorage('./storage');
9
7
 
10
8
 
11
9
  async function setEnvVariables() {
@@ -72,6 +70,7 @@ async function setSuiteDetails() {
72
70
  console.log("BROWSERSTACK_APP_PATH" + process.env.BROWSERSTACK_APP_PATH)
73
71
  process.env.TESTDATA_ID = getSuiteDetail.test_data_id;
74
72
  console.log("ALL JSON DATA:" + JSON.stringify(BUFFER));
73
+ console.log("ALL JSON DATA in env variable :" + JSON.stringify(process.env));
75
74
 
76
75
  } catch (error) {
77
76
  // console.error('Error in main function:', error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "readme": "WendriverIO Integration with [BrowserStack]",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",