froth-webdriverio-framework 2.0.33 → 2.0.35

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.
@@ -111,7 +111,7 @@ async function updateExecuitonDetails(frothUrl, token, id, resultdetails) {
111
111
  if (resultdetails.excution_time != null) {
112
112
  formData.append('excution_time', resultdetails.excution_time);
113
113
  }
114
- formData.append('id', BUFFER.getItem("EXECUTION_ID"))
114
+ formData.append('id', BUFFER.getItem("FROTH_EXECUTION_ID"))
115
115
  formData.append('report_url', BUFFER.getItem("REPORT_URL"))
116
116
 
117
117
  const response = await fetch(url, {
@@ -154,7 +154,7 @@ async function updateScriptExecutionStatus(frothUrl, token, scriptid, status) {
154
154
 
155
155
  if (scriptid != 0) {
156
156
  try {
157
- const id = await getExecuitonScriptDetails(frothUrl, token, BUFFER.getItem("EXECUTION_ID"), scriptid)
157
+ const id = await getExecuitonScriptDetails(frothUrl, token, BUFFER.getItem("FROTH_EXECUTION_ID"), scriptid)
158
158
  const url = `${frothUrl}/api/script-status-percentage/${id}/`;
159
159
  const formData = new FormData();
160
160
 
@@ -24,6 +24,11 @@ let storeattributevalue = null;
24
24
  let assertAttributeValue = null;
25
25
  let basepath = null;
26
26
  let scrollIntoView = null;
27
+
28
+ let api=null;
29
+
30
+ let selectDropDownValue=null;
31
+
27
32
  if (process.env.LOCATION == 'local') {
28
33
  basepath = ".";
29
34
  } else {
@@ -55,33 +60,10 @@ storetext = require(basepath + '/storeToBuffer').STORETEXT;
55
60
  storevalue = require(basepath + '/storeToBuffer').STOREVALUE;
56
61
  storeattributevalue = require(basepath + '/storeToBuffer').STOREATTRIBUTEVALUE;
57
62
 
58
- // } else {
59
- // scrollToEnd = require('froth-webdriverio-framework/commonMethods/scroll').scrollToEnd;
60
- // scrollDownToView = require('froth-webdriverio-framework/commonMethods/scroll').scrollDownToView;
61
- // scrollToBeginning = require('froth-webdriverio-framework/commonMethods/scroll').scrollToBeginning;
62
- // scrollToLeft = require('froth-webdriverio-framework/commonMethods/scroll').scrollToLeft;
63
- // scrollToRight = require('froth-webdriverio-framework/commonMethods/scroll').scrollToRight;
64
- // scrollRightToView = require('froth-webdriverio-framework/commonMethods/scroll').scrollRightToView;
65
-
63
+ api = require(basepath + '/apicall').callapi;
64
+ selectDropDownValue = require(basepath + '/dropDown').selectDropDownValue;
66
65
 
67
- // clickIfVisible = require('froth-webdriverio-framework/commonMethods/clickIfVisible');
68
66
 
69
- // assertText = require('froth-webdriverio-framework/commonMethods/assert').assertText;
70
- // assertAttributeValue = require('froth-webdriverio-framework/commonMethods/assert').assertAttributeValue;
71
-
72
- // randomtext = require('froth-webdriverio-framework/commonMethods/random').RANDOMTEXT;
73
- // randomnumber = require('froth-webdriverio-framework/commonMethods/random').RNDNUMBER;
74
- // randomfloat = require('froth-webdriverio-framework/commonMethods/random').RNDFLOAT;
75
- // randomint = require('froth-webdriverio-framework/commonMethods/random').RNDINT;
76
- // randomalphanum = require('froth-webdriverio-framework/commonMethods/random').RNDALPHANUM;
77
- // randomdecimal = require('froth-webdriverio-framework/commonMethods/random').RNDDECIMAL;
78
- // randomregex = require('froth-webdriverio-framework/commonMethods/random').RNDREGEX;
79
-
80
- // storetext = require('froth-webdriverio-framework/commonMethods/storeToBuffer').STORETEXT;
81
- // storevalue = require('froth-webdriverio-framework/commonMethods/storeToBuffer').STOREVALUE;
82
- // storeattributevalue = require('froth-webdriverio-framework/commonMethods/storeToBuffer').STOREATTRIBUTEVALUE;
83
-
84
- // }
85
67
  //export the variabels
86
68
  module.exports = {
87
69
  scrollToEnd,
@@ -103,6 +85,6 @@ module.exports = {
103
85
  storetext,
104
86
  storevalue,
105
87
  storeattributevalue,
106
- scrollIntoView
107
-
88
+ scrollIntoView,
89
+ api
108
90
  };
@@ -0,0 +1,37 @@
1
+
2
+ async function callapi(method,api_url, queryParams, payloaddetails,authentication,headers) {
3
+ let response;
4
+ if (queryParams && Object.keys(queryParams).length > 0) {
5
+ const queryParams = new URLSearchParams(queryParams).toString();
6
+ api_url += `?${queryParams}`;
7
+ }
8
+ console.log("URL: " + api_url);
9
+ const formData = new FormData();
10
+
11
+ if (payloaddetails && Object.keys(payloaddetails).length > 0) {
12
+ Object.entries(payloaddetails).forEach(([key, value]) => formData.append(key, value));
13
+ }
14
+
15
+ try {
16
+ // Send the request with axios and form-data
17
+ response = await fetch(api_url, {
18
+ method: method,
19
+ headers: await formheaders(authentication,headers),
20
+ body: formData // Optional: handle large payloads
21
+ });
22
+ }
23
+ catch (error) {
24
+ console.error('Error during API call:', error.response ? error.response.data : error.message);
25
+ }
26
+ return response;
27
+ }
28
+
29
+
30
+ // Function to form headers
31
+ async function formheaders(authentication,headers) {
32
+ if (authentication !== "") {
33
+ headers.Authorization = `Bearer ${authentication}`;
34
+ }
35
+ }
36
+
37
+ module.exports = { callapi };
@@ -0,0 +1,23 @@
1
+ async function selectDropDownValue(elementSelector, selectOption) {
2
+ try {
3
+ // let selectBox = await $(elementSelector);
4
+ await $(elementSelector).selectByAttribute('value', selectOption);
5
+
6
+ } catch (error) {
7
+ console.error('Error occurred while selecting the option:', error);
8
+ let annotationMessage = `Error occurred while selecting the option: ${error.message}.`;
9
+ await amendToBrowserstack(annotationMessage, "error");
10
+ }
11
+ }
12
+
13
+
14
+ async function amendToBrowserstack(annotationMessage, level) {
15
+ try {
16
+ await driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"' + annotationMessage + '","level": "' + level + '"}}');
17
+
18
+ } catch (error) {
19
+ console.error('Error occurred while verifying text:', error);
20
+ throw error;
21
+ }
22
+ }
23
+ module.exports = { selectDropDownValue };
@@ -22,8 +22,8 @@ const androidConfig = deepmerge.all([commonmobileconfig, {
22
22
 
23
23
  capabilities: [{
24
24
  'bstack:options': {
25
- deviceName: process.env.DEVICENAME,
26
- platformVersion: process.env.OSVERSION,
25
+ deviceName: process.env.DEVICENAME || 'Samsung Galaxy S23 Ultra',
26
+ platformVersion: process.env.OSVERSION || '13.0',
27
27
  platformName: 'android',
28
28
  interactiveDebugging: true,
29
29
  buildName: process.env.BROWSERSTACK_BUILD_NAME || 'Android_Build',
@@ -1,70 +1,68 @@
1
+ const deepmerge = require('deepmerge')
2
+ const commonconfig = require('./commonconfig');
3
+ const apiconfig = deepmerge.all([commonconfig, {
4
+
5
+ // ====================
6
+ // Capabilities
7
+ // ====================
8
+ capabilities: [{
9
+ maxInstances: 5,
10
+ browserName: 'chrome',
11
+ acceptInsecureCerts: true,
12
+ }],
13
+ runner: 'local',
1
14
 
15
+ // ====================
16
+ // Test Configurations
17
+ // ====================
18
+ logLevel: 'info', // Set the log level
19
+ bail: 0, // Set to 1 to stop the test suite after the first test failure
20
+ baseUrl: '', // Specify the base URL of your application
21
+ waitforTimeout: 60000, // Set the timeout for all waitFor* commands
22
+ connectionRetryTimeout: 90000, // Set the timeout in milliseconds for test retries
23
+ connectionRetryCount: 3, // Set the number of times to retry the entire spec file
2
24
 
3
- const config = {
4
-
5
- // ====================
6
- // Capabilities
7
- // ====================
8
- capabilities: [{
9
- maxInstances: 5,
10
- browserName: 'chrome',
11
- acceptInsecureCerts: true,
12
- }],
13
-
14
- // ====================
15
- // Test Configurations
16
- // ====================
17
- logLevel: 'info', // Set the log level
18
- bail: 0, // Set to 1 to stop the test suite after the first test failure
19
- baseUrl: '', // Specify the base URL of your application
20
- waitforTimeout: 60000, // Set the timeout for all waitFor* commands
21
- connectionRetryTimeout: 90000, // Set the timeout in milliseconds for test retries
22
- connectionRetryCount: 3, // Set the number of times to retry the entire spec file
23
-
24
- // ====================
25
- // Framework
26
- // ====================
27
- framework: 'mocha', // Use the Mocha framework
28
- reporters: ['spec'], // Use the spec reporter
29
- // reporterOptions: {
30
- // allure: {
31
- // outputDir: 'allure-results',
32
- // disableWebdriverStepsReporting: true,
33
- // disableWebdriverScreenshotsReporting: false,
34
- // }
35
- //},
36
- // ====================
37
- // Hooks
38
- // ====================
39
- before: function (capabilities, specs) {
40
- // Code to run before the first test
41
- const currentDate = new Date();
42
- const timestamp = currentDate.toISOString().replace(/[:.]/g, '');
43
- browser.saveScreenshot('./screenshot_' + timestamp + '.png');
44
-
45
- },
46
- after: function (capabilities, specs) {
47
- // Code to run to take screenshots
48
- const currentDate = new Date();
49
- const timestamp = currentDate.toISOString().replace(/[:.]/g, '');
50
- browser.saveScreenshot('./screenshot_' + timestamp + '.png');
51
-
52
-
53
- },
54
-
55
- // ====================
56
- // BrowserStack Options
57
- // ====================
58
- browserstackOpts: {
59
- // BrowserStack-specific options
60
- },
61
-
62
- // ====================
63
- // Mocha Options
64
- // ====================
65
- mochaOpts: {
66
- ui: 'bdd', // Set the test interface to BDD
67
- timeout: 60000, // Set the timeout for test cases in milliseconds
68
- },
69
- };
70
- module.exports = config;
25
+ // ====================
26
+ // Framework
27
+ // ====================
28
+ framework: 'mocha', // Use the Mocha framework
29
+ reporters: ['spec'], // Use the spec reporter
30
+ // reporterOptions: {
31
+ // allure: {
32
+ // outputDir: 'allure-results',
33
+ // disableWebdriverStepsReporting: true,
34
+ // disableWebdriverScreenshotsReporting: false,
35
+ // }
36
+ //},
37
+ // ====================
38
+ // Hooks
39
+ // ====================
40
+ before: function (capabilities, specs) {
41
+ // Code to run before the first test
42
+
43
+
44
+ },
45
+ after: function (capabilities, specs) {
46
+ // Code to run to take screenshots
47
+
48
+
49
+
50
+ },
51
+
52
+ // ====================
53
+ // BrowserStack Options
54
+ // ====================
55
+ browserstackOpts: {
56
+ // BrowserStack-specific options
57
+ },
58
+
59
+ // ====================
60
+ // Mocha Options
61
+ // ====================
62
+ mochaOpts: {
63
+ ui: 'bdd', // Set the test interface to BDD
64
+ timeout: 60000, // Set the timeout for test cases in milliseconds
65
+ },
66
+ }]);
67
+
68
+ module.exports = apiconfig;
@@ -12,7 +12,7 @@ const commonmobconfig = deepmerge.all([commonconfig, {
12
12
  baseUrl: '',
13
13
  waitforTimeout: 90000,
14
14
  connectionRetryTimeout: 90000,
15
- connectionRetryCount: 3,
15
+ connectionRetryCount: 2,
16
16
 
17
17
  framework: 'mocha',
18
18
  mochaOpts: {
@@ -33,9 +33,11 @@ const commonconfig = {
33
33
  console.log("Running suite:", suite.title);
34
34
  // const sessionId = browser.sessionId;
35
35
  // BUFFER.setItem("SESSION_ID", sessionId)
36
- await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
36
+ if (process.env.BS_SESSION_TYPE && process.env.BROWSERSTACK_USERNAME && process.env.BROWSERSTACK_ACCESS_KEY) {
37
+ await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
38
+ }
37
39
  const resultdetails = {};
38
- exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), BUFFER.getItem("EXECUTION_ID"), resultdetails)
40
+ exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
39
41
 
40
42
  } catch (e) {
41
43
  console.log("Error in beforeSuite:", e);
@@ -73,7 +75,7 @@ const commonconfig = {
73
75
  console.log(`Test '${test.title}' finished.`);
74
76
  const fileName = path.basename(test.file);
75
77
  console.log('Test File Name:', fileName);
76
- // BUFFER.setItem("TOTAL_DURATION", Number(BUFFER.getItem("TOTAL_DURATION")) + duration)
78
+ // BUFFER.setItem("FROTH_TOTAL_DURATION", Number(BUFFER.getItem("FROTH_TOTAL_DURATION")) + duration)
77
79
  console.log(`Duration: ${duration}ms`);
78
80
  console.log(`Passed: ${passed}`);
79
81
  let scriptresult="NOT RUN";
@@ -90,7 +92,7 @@ const commonconfig = {
90
92
  scriptresult = "FAILED"
91
93
  }
92
94
  console.log('---------------------------------------');
93
- await exeDetails.updateScriptExecutionStatus(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), scriptid,scriptresult)
95
+ await exeDetails.updateScriptExecutionStatus(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), scriptid,scriptresult)
94
96
 
95
97
  },
96
98
  /**
@@ -113,10 +115,10 @@ const commonconfig = {
113
115
  console.log("result data :" + BUFFER.getItem("RESULT_DATA"))
114
116
  const resultdetails = {}
115
117
  resultdetails.excution_status = BUFFER.getItem("RESULT_DATA") == 0 ? 'PASSED' : 'FAILED'
116
- console.log("Total Duration:" + BUFFER.getItem("TOTAL_DURATION"));
118
+ console.log("Total Duration:" + BUFFER.getItem("FROTH_TOTAL_DURATION"));
117
119
  console.log("Results" + resultdetails.excution_status);
118
- resultdetails.excution_time = await secondsToTime(BUFFER.getItem("TOTAL_DURATION"))
119
- await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), BUFFER.getItem("EXECUTION_ID"), resultdetails)
120
+ resultdetails.excution_time = await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION"))
121
+ await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
120
122
 
121
123
  },
122
124
 
@@ -127,9 +129,9 @@ const commonconfig = {
127
129
  await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
128
130
  const resultdetails = {}
129
131
  resultdetails.excution_status = BUFFER.getItem("RESULT_DATA") == 0 ? 'PASSED' : 'FAILED'
130
- console.log("Total Duration:" + BUFFER.getItem("TOTAL_DURATION"));
131
- resultdetails.excution_time = await secondsToTime(BUFFER.getItem("TOTAL_DURATION"))
132
- await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), BUFFER.getItem("EXECUTION_ID"), resultdetails)
132
+ console.log("Total Duration:" + BUFFER.getItem("FROTH_TOTAL_DURATION"));
133
+ resultdetails.excution_time = await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION"))
134
+ await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
133
135
  BUFFER.clear();
134
136
  // Perform any cleanup or post-test actions here
135
137
  },
@@ -38,10 +38,10 @@ async function padZero(num) {
38
38
 
39
39
  async function setEnvVariables() {
40
40
  generateBuildNumber();
41
- BUFFER.setItem("TOTAL_DURATION", 0);
42
- BUFFER.setItem("EXECUTION_ID", process.env.EXECUTION_ID);
43
- BUFFER.setItem("INTEGRATION_ID", process.env.INTEGRATION_ID);
44
- BUFFER.setItem("ORGANISATION_DOMAIN_URL", process.env.ORGANISATION_DOMAIN_URL);
41
+ BUFFER.setItem("FROTH_TOTAL_DURATION", 0);
42
+ BUFFER.setItem("FROTH_EXECUTION_ID", process.env.EXECUTION_ID || 1);
43
+ BUFFER.setItem("FROTH_INTEGRATION_ID", process.env.INTEGRATION_ID || 1);
44
+ BUFFER.setItem("ORGANISATION_DOMAIN_URL", process.env.ORGANISATION_DOMAIN_URL || "https://devapi.frothtestops.com");
45
45
  BUFFER.setItem("SERVICE_USER", "frothbot@roboticodigital.com");
46
46
  BUFFER.setItem("SERVICE_PASSWORD", "RnJvdGh0ZXN0b3BzQDU1NQ==");
47
47
 
@@ -51,9 +51,9 @@ async function setEnvVariables() {
51
51
  async function setLoginToken() {
52
52
  try {
53
53
 
54
- const getToken = await getLoginToken(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("SERVICE_USER"), BUFFER.getItem("SERVICE_PASSWORD"));
55
- process.env.LOGIN_TOKEN = getToken;
56
- BUFFER.setItem("LOGIN_TOKEN", getToken)
54
+ const getToken = await getLoginToken(BUFFER.getItem("ORGANISATION_DOMAIN_URL") , BUFFER.getItem("SERVICE_USER"), BUFFER.getItem("SERVICE_PASSWORD"));
55
+ process.env.FROTH_LOGIN_TOKEN = getToken;
56
+ BUFFER.setItem("FROTH_LOGIN_TOKEN", getToken)
57
57
 
58
58
  } catch (error) {
59
59
  // console.error('Error in main function:', error);
@@ -62,7 +62,7 @@ async function setLoginToken() {
62
62
 
63
63
  async function setExecutionDetails() {
64
64
  try {
65
- const getExeDetails = await exeDetails.getExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), BUFFER.getItem("EXECUTION_ID"));
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
67
 
68
68
  } catch (error) {
@@ -72,7 +72,7 @@ async function setExecutionDetails() {
72
72
 
73
73
  async function setIntegrationsDetails() {
74
74
  try {
75
- const getIntegrationDetails = await getintegrationdetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), BUFFER.getItem("INTEGRATION_ID"));
75
+ const getIntegrationDetails = await getintegrationdetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_INTEGRATION_ID"));
76
76
  if (getIntegrationDetails.product === "BrowserStack") {
77
77
  process.env.BROWSERSTACK_USERNAME = getIntegrationDetails.username;
78
78
  process.env.BROWSERSTACK_ACCESS_KEY = getIntegrationDetails.token;
@@ -85,7 +85,7 @@ async function setIntegrationsDetails() {
85
85
  }
86
86
  async function setSuiteDetails() {
87
87
  try {
88
- const getSuiteDetail = await getSuiteDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), BUFFER.getItem("AUTOMATION_SUITE_ID"));
88
+ const getSuiteDetail = await getSuiteDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("AUTOMATION_SUITE_ID"));
89
89
  process.env.BROWSERSTACK_APP_PATH = getSuiteDetail.browser_stack_urls;
90
90
  BUFFER.setItem("TESTDATA_ID", getSuiteDetail.test_data_id);
91
91
 
@@ -96,7 +96,7 @@ async function setSuiteDetails() {
96
96
  }
97
97
  async function setTestDataDetails() {
98
98
  try {
99
- const jsonobject = await getDataById(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), BUFFER.getItem("TESTDATA_ID"));
99
+ const jsonobject = await getDataById(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("TESTDATA_ID"));
100
100
 
101
101
  } catch (error) {
102
102
  // console.error('Error in main function:', error);
@@ -31,7 +31,7 @@ const webbsconfig = deepmerge.all([commonconfig, {
31
31
  capabilities: [
32
32
  {
33
33
  browserName: process.env.BROWSERSTACK_BROWSER || 'chrome', // Choose the browser you want to test
34
- browserVersion: process.env.BROWSERSTACK_BROWSER_VERSION || 'latest', // Specify the browser version
34
+ browserVersion: process.env.BROWSERSTACK_BROWSER_VERSION || '129', // Specify the browser version
35
35
  os: 'Windows', // Specify the operating system
36
36
  os_version: '10', // Specify the operating system version
37
37
  resolution: '1920x1080', // Specify the screen resolution
@@ -49,9 +49,9 @@ const webbsconfig = deepmerge.all([commonconfig, {
49
49
  logLevel: 'info', // Set the log level
50
50
  bail: 0, // Set to 1 to stop the test suite after the first test failure
51
51
  baseUrl: '', // Specify the base URL of your application
52
- waitforTimeout: 60000, // Set the timeout for all waitFor* commands
52
+ waitforTimeout: 90000, // Set the timeout for all waitFor* commands
53
53
  connectionRetryTimeout: 90000, // Set the timeout in milliseconds for test retries
54
- connectionRetryCount: 3, // Set the number of times to retry the entire spec file
54
+ connectionRetryCount: 2, // Set the number of times to retry the entire spec file
55
55
 
56
56
  // ====================
57
57
  // Framework
@@ -82,7 +82,7 @@ const webbsconfig = deepmerge.all([commonconfig, {
82
82
  // ====================
83
83
  mochaOpts: {
84
84
  ui: 'bdd', // Set the test interface to BDD
85
- timeout: 60000, // Set the timeout for test cases in milliseconds
85
+ timeout: 90000, // Set the timeout for test cases in milliseconds
86
86
  },
87
87
  }]);
88
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "2.0.33",
3
+ "version": "2.0.35",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",
@@ -1,17 +0,0 @@
1
-
2
- async function verifyTextInFieldAttribute(element, attribute, expectedText, driver) {
3
-
4
- try {
5
- let ele = await driver.$(element);
6
- // Get the actual text from the specified attribute
7
- const actualText = await ele.getAttribute(attribute);
8
-
9
- // Assert that the actual text matches the expected text
10
- assert.strictEqual(actualText, expectedText, `Expected text: ${expectedText}, Actual text: ${actualText}`);
11
- console.log('Text verification passed!');
12
- } catch (error) {
13
- console.log('Text verification failed:', `Expected text: ${expectedText}, Actual text: ${actualText}`);
14
- console.error(error.message);
15
- }
16
- }
17
- module.exports = verifyTextInFieldAttribute;