froth-webdriverio-framework 1.0.89 → 1.0.91

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.
@@ -24,14 +24,14 @@ async function getSuiteDetails(frothUrl, token, id) {
24
24
  jsondata.test_data_id = data.test_data_id;
25
25
  jsondata.browser_stack_urls = data.browser_stack_urls;
26
26
  jsondata.automation_script_id=data.automation_script_id;
27
- console.log("automation_script_id:" + JSON.stringify(jsondata.automation_script_id))
27
+ // console.log("automation_script_id:" + JSON.stringify(jsondata.automation_script_id))
28
28
  const automationScripts = jsondata.automation_script_id.reduce((obj, item) => {
29
29
  obj[item.automation_script_id] = item.automation_script_id;
30
30
  BUFFER.setItem(item.automation_script_name, item.id);
31
31
  return obj;
32
32
  }, {});
33
33
  jsondata.test_sequence = data.test_sequence;
34
- console.log("automation_script_ details:" + JSON.stringify(BUFFER))
34
+ // console.log("automation_script_ details:" + JSON.stringify(BUFFER))
35
35
 
36
36
  // console.log("json data :" + JSON.stringify(jsondata));
37
37
 
@@ -1,6 +1,6 @@
1
1
  // Function to verify text in Android app
2
2
  async function verifyText(driver, elementSelector, expectedText) {
3
- try {
3
+ // try {
4
4
  // Wait for the element to be visible
5
5
  await driver.waitUntil(async () => {
6
6
  const element = await driver.$(elementSelector);
@@ -11,16 +11,18 @@ async function verifyText(driver, elementSelector, expectedText) {
11
11
  const element = await driver.$(elementSelector);
12
12
  const actualText = await element.getText();
13
13
 
14
- // Compare the actual text with the expected text
15
- if (actualText === expectedText) {
16
- console.log('Text verification passed. Actual text:', actualText, 'Expected text:', expectedText);
17
- return true;
18
- } else {
19
- console.warn('Text verification failed. Actual text:', actualText, 'Expected text:', expectedText);
20
- }
21
- } catch (error) {
22
- console.error('Error occurred while verifying text:', error);
23
- }
14
+ expect(actualText).toEqual(expectedText,`Expected title to be "${expectedText}", but found "${actualText}"`);
15
+
16
+ // // Compare the actual text with the expected text
17
+ // if (actualText === expectedText) {
18
+ // console.log('Text verification passed. Actual text:', actualText, 'Expected text:', expectedText);
19
+ // return true;
20
+ // } else {
21
+ // console.warn('Text verification failed. Actual text:', actualText, 'Expected text:', expectedText);
22
+ // }
23
+ // } catch (error) {
24
+ // console.error('Error occurred while verifying text:', error);
25
+ // }
24
26
  }
25
27
 
26
28
  module.exports = verifyText;
@@ -9,7 +9,7 @@ const androidConfig = deepmerge.all([commonmobileconfig, {
9
9
  [
10
10
  'browserstack',
11
11
  {
12
- testObservability: true,
12
+ // testObservability: true,
13
13
  // buildName: "ANDROID BUILD",
14
14
  // buildIdentifier: "ANDROID BUILD_" + process.env.BUILD_NUMBER,
15
15
  browserstackLocal: process.env.BROWSERSTACK_LOCAL || false,
@@ -26,7 +26,7 @@ const androidConfig = deepmerge.all([commonmobileconfig, {
26
26
  platformVersion: process.env.OSVERSION,
27
27
  platformName: 'android',
28
28
  interactiveDebugging: true,
29
- buildName: process.env.BROWSERSTACK_BUILD_NAME || 'default-build-name',
29
+ buildName: process.env.BROWSERSTACK_BUILD_NAME || 'Android_Build',
30
30
 
31
31
  }
32
32
  }],
@@ -90,7 +90,7 @@ const commonconfig = {
90
90
  scriptresult = "FAILED"
91
91
  }
92
92
  console.log('---------------------------------------');
93
- await exeDetails.updateScriptExecutionStatus(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), scriptid, scriptresult)
93
+ await exeDetails.updateScriptExecutionStatus(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), scriptid,scriptresult)
94
94
 
95
95
  },
96
96
  /**
@@ -6,12 +6,12 @@ const iosconfig = deepmerge.all([commonmobileconfig, {
6
6
  [
7
7
  'browserstack',
8
8
  {
9
- testObservability: true,
10
- buildIdentifier: `#${process.env.BUILD_NUMBER}`,
11
- browserstackLocal: false,
9
+ // testObservability: true,
10
+ // buildIdentifier: `#${process.env.BUILD_NUMBER}`,
11
+ browserstackLocal: process.env.BROWSERSTACK_LOCAL || false,
12
12
  opts: {
13
13
  forcelocal: false,
14
- localIdentifier: "webdriverio-appium"
14
+ // localIdentifier: "webdriverio-appium"
15
15
  },
16
16
  app: process.env.BROWSERSTACK_APP_PATH || 'bs://d6588d0899a2ac5c485d4784af9ad28d06b98c44'
17
17
  }
@@ -24,7 +24,7 @@ const iosconfig = deepmerge.all([commonmobileconfig, {
24
24
  osVersion: process.env.OSVERSION || "17",
25
25
  platformName: 'iOS',
26
26
  interactiveDebugging: true,
27
- buildName: process.env.BROWSERSTACK_BUILD_NAME || 'default-build-name',
27
+ buildName: process.env.BROWSERSTACK_BUILD_NAME || 'IOS_Build',
28
28
 
29
29
  }
30
30
  }],
@@ -15,14 +15,14 @@ const webbsconfig = deepmerge.all([commonconfig, {
15
15
 
16
16
  services: [
17
17
  ['browserstack', {
18
- testObservability: true,
19
- testObservabilityOptions: {
20
- // user: 'prabathkumar_qavxGX' || process.env.BROWSERSTACK_USERNAME,
21
- // key: 'RvqEi62rhwa5QwGJtweZ' || process.env.BROWSERSTACK_ACCESS_KEY,
22
- projectName: process.env.PROJECTNAME || "roboticodigital",
23
- // buildName: 'WEB BUILD',
24
- buildTag: 'WEB BUILD',
25
- },
18
+ // testObservability: true,
19
+ // testObservabilityOptions: {
20
+ // // user: 'prabathkumar_qavxGX' || process.env.BROWSERSTACK_USERNAME,
21
+ // // key: 'RvqEi62rhwa5QwGJtweZ' || process.env.BROWSERSTACK_ACCESS_KEY,
22
+ // projectName: process.env.PROJECTNAME || "roboticodigital",
23
+ // // buildName: 'WEB BUILD',
24
+ // buildTag: 'WEB BUILD',
25
+ // },
26
26
  }]
27
27
  ],
28
28
  // ====================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",
@@ -36,6 +36,7 @@
36
36
  "browserstack-local": "^1.5.5",
37
37
  "deepmerge": "^4.3.1",
38
38
  "form-data": "^4.0.0",
39
+ "mysql2": "^3.10.2",
39
40
  "node-fetch": "^3.3.2",
40
41
  "node-localstorage": "^3.0.5",
41
42
  "ts-node": "^10.9.2",