froth-webdriverio-framework 3.0.67 → 3.0.69

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.
@@ -36,7 +36,7 @@ async function getBSBuildDetails(sessiontype, bs_username, bs_pwd) {
36
36
  } else {
37
37
  const errorText = await response.text();
38
38
  console.error(`Data fetch failed response in getBSBuildDetails:${response.status}`);
39
- // console.error(`Data fetch failed response in getBSBuildDetails:${errorText}`);
39
+ // console.error(`Data fetch failed response in getBSBuildDetails:${errorText}`);
40
40
  // throw new Error(`HTTP error! status: ${response.status}`);
41
41
  }
42
42
 
@@ -81,7 +81,7 @@ async function getBSSessionDetails(sessiontype, bs_username, bs_pwd) {
81
81
  const duration = data[0].automation_session.duration;
82
82
  BUFFER.setItem("REPORT_URL", publicUrl)
83
83
  BUFFER.setItem("FROTH_TOTAL_DURATION", duration)
84
-
84
+ console.log("public url:" + publicUrl)
85
85
  //return jsondata;
86
86
  } else if (response.status === 401) { //
87
87
  console.log("Unauthorized, token expired")
@@ -23,7 +23,7 @@ const commonconfig = {
23
23
  // await setAllDetails.setIntegrationsDetails();
24
24
  await setAllDetails.setSuiteDetails();
25
25
  await setAllDetails.setTestDataDetails();
26
- // console.log(JSON.stringify(capabilities))
26
+ console.log("on prepare:",JSON.stringify(capabilities))
27
27
  // console.log("ALL JSON DATA in env variable :" + JSON.stringify(process.env));
28
28
  } catch (e) {
29
29
  console.log("====> Error in onPrepare:", e);
@@ -36,13 +36,16 @@ const commonconfig = {
36
36
  console.log('====> This is the beforesession hook');
37
37
  // Perform any setup or pre-test actions here
38
38
  // console.log("Capabilities:", capabilities);
39
- console.log("Specs:", specs.length);
40
- const specdat = specs
41
- console.log("specdat:", specdat);
42
- console.log("length:", specdat.length);
43
-
39
+
40
+ console.log("specdat:", specs);
41
+ console.log("length:", specs.length);
42
+ console.log("capabilities:", capabilities);
43
+ // capabilities.app = process.env.APP_PATH; // Replace with actual path
44
+ console.log("====>",capabilities)
44
45
  console.log(`Running tests on: ${capabilities.platformName} ${capabilities.browserName} ${capabilities.browserVersion}`);
45
- // console.log('specs:', specs);
46
+
47
+
48
+ // console.log('specs:', specs);
46
49
  // console.log("Config:", config);
47
50
  },
48
51
  /**
@@ -6,18 +6,21 @@ const commonconfig = require('./commonconfig');
6
6
 
7
7
  // Select platform at runtime
8
8
  const PLATFORM = process.env.PLATFORM || 'browserstack';
9
- const configFile = PLATFORM === 'browserstack' ? '../ymls/browserstack/android/sample.yml' : 'saucelabs-config.yml';
9
+ const configFile = PLATFORM === 'browserstack' ? __dirname + process.env.YML_NAME : '../ymls/saucelab/' + process.env.YML_NAME;
10
10
  console.log('PLATFORM:', PLATFORM);
11
11
  const SUITE_FILE = process.env.SUITE;
12
12
  // Load YAML file
13
13
  const capabilities = yaml.load(fs.readFileSync(path.join(__dirname, configFile), 'utf8'));
14
+
14
15
  capabilities.buildName = process.env.BROWSERSTACK_BUILD_NAME;
15
- console.log('capabilities:', capabilities.platformName);
16
- process.env.BS_SESSION_TYPE = capabilities.platformName === 'android' || capabilities.platformName === 'ios'? 'app-automate' : 'automate';
17
- process.env.BROWSERSTACK_USERNAME=capabilities.userName;
18
- process.env.BROWSERSTACK_ACCESS_KEY=capabilities.accessKey;
19
- console.log('process.env.BS_SESSION_TYPE:', process.env.BS_SESSION_TYPE);
20
- console.log('capabilities:', capabilities);
16
+
17
+
18
+ if (PLATFORM === 'browserstack') {
19
+ process.env.BROWSERSTACK_USERNAME = capabilities.userName;
20
+ process.env.BROWSERSTACK_ACCESS_KEY = capabilities.accessKey;
21
+ process.env.BS_SESSION_TYPE = capabilities.platformName === 'android' || capabilities.platformName === 'ios' ? 'app-automate' : 'automate';
22
+
23
+ }
21
24
 
22
25
  exports.config = deepmerge(commonconfig,
23
26
 
@@ -27,14 +30,14 @@ exports.config = deepmerge(commonconfig,
27
30
  // debug: true,
28
31
  // execArgv: ['--inspect-brk'],
29
32
  services: PLATFORM === 'browserstack'
30
- ? ['browserstack']
31
- : PLATFORM === 'saucelabs'
32
- ? ['sauce']
33
- : [],
33
+ ? ['browserstack']
34
+ : PLATFORM === 'saucelabs'
35
+ ? ['sauce']
36
+ : [],
34
37
 
35
38
  //runner: 'local',
36
39
  specs: require(SUITE_FILE).tests,
37
-
40
+
38
41
  maxInstances: 1,
39
42
  capabilities: [capabilities],
40
43
 
@@ -47,8 +50,6 @@ exports.config = deepmerge(commonconfig,
47
50
  connectionRetryTimeout: 90000,
48
51
  connectionRetryCount: 3,
49
52
 
50
-
51
-
52
53
  framework: 'mocha',
53
54
  reporters: ['spec'],
54
55
  maxInstances: 10,
@@ -1,4 +1,4 @@
1
- 2025-02-17T09:51:31.710Z DEBUG @wdio/browserstack-service Sending SDK event with data {
1
+ 2025-02-19T05:55:09.449Z DEBUG @wdio/browserstack-service Sending SDK event with data {
2
2
  userName: 'subhrasubudhi_uf8nhj',
3
3
  accessKey: 'DUGGqze7p9QMZb84y66s',
4
4
  event_type: 'SDKTestAttempted',
@@ -22,11 +22,76 @@
22
22
  product: [ 'observability', 'automate' ]
23
23
  }
24
24
  }
25
- 2025-02-17T09:51:32.118Z DEBUG @wdio/browserstack-service Funnel Event Response: "{\"message\":\"SDK Event recorded successfully\"}"
26
- 2025-02-17T09:51:32.118Z DEBUG @wdio/browserstack-service Funnel event success
27
- 2025-02-17T09:51:32.118Z DEBUG @wdio/browserstack-service app is not defined in browserstack-service config, skipping ...
28
- 2025-02-17T09:51:32.119Z DEBUG @wdio/browserstack-service Sending launch start event
29
- 2025-02-17T09:51:33.444Z DEBUG @wdio/browserstack-service [Start_Build] Success response: {"build_hashed_id":"wtqx3b2xf78ipajozv9ywenfyvrwb8upk23lfojk","jwt":"eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJicm93c2Vyc3RhY2tfb2IiLCJzdWIiOiI2MTA1MDM2IiwiZ3JvdXBfaWQiOjQ2OTIyNTksInVzZXJfaWQiOjYxMDUwMzYsImJ1aWxkX2hhc2hlZF9pZCI6Ind0cXgzYjJ4Zjc4aXBham96djl5d2VuZnl2cndiOHVwazIzbGZvamsiLCJob29rX2FzX3Rlc3QiOiIxIiwiYnVpbGRfbmFtZSI6IldFQkRSSVZFUklPIiwicHJvZHVjdF9tYXAiOiJ7XCJvYnNlcnZhYmlsaXR5XCI6dHJ1ZSxcIm9yaWdpbkZyb21Qcm9kdWN0TWFwXCI6XCJVbmtub3duR3JpZFwiLFwiYnN0YWNrQXV0b21hdGlvblwiOmZhbHNlLFwicHJvZHVjdEZpbHRlclNvdXJjZVwiOmZhbHNlLFwiY2FkXCI6dHJ1ZX0iLCJncnJfcmVnaW9uIjoiIiwic2lnbmluZ19rZXlfaGFzaCI6IjdkZjZlNjgzYzY3MDkxYjZiY2FiNDk1ZTNmN2YyYWExNjljNzVmMzFmYmFmYTUwZjQ3MDI0YzgxYjllNzA1M2QiLCJpYXQiOjE3Mzk3ODU4OTMsImV4cCI6MTc0MDEzMTQ5M30.9mvwQDShuQgqYmwsn765M1LtnBdD2yoBwqssVKAkF38","allow_screenshots":true}
30
- 2025-02-17T09:51:33.444Z INFO @wdio/browserstack-service browserstackLocal is not enabled - skipping...
31
- 2025-02-17T09:51:39.078Z DEBUG @wdio/browserstack-service Inside OnComplete hook..
32
- 2025-02-17T09:51:39.078Z DEBUG @wdio/browserstack-service Sending stop launch event
25
+ 2025-02-19T05:55:09.777Z DEBUG @wdio/browserstack-service Funnel Event Response: "{\"message\":\"SDK Event recorded successfully\"}"
26
+ 2025-02-19T05:55:09.778Z DEBUG @wdio/browserstack-service Funnel event success
27
+ 2025-02-19T05:55:09.778Z DEBUG @wdio/browserstack-service app is not defined in browserstack-service config, skipping ...
28
+ 2025-02-19T05:55:09.779Z DEBUG @wdio/browserstack-service Sending launch start event
29
+ 2025-02-19T05:55:11.108Z DEBUG @wdio/browserstack-service [Start_Build] Success response: {"build_hashed_id":"91u9aev0hlljrxbwddcndynfpo91xvoblt7olgqq","jwt":"eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJicm93c2Vyc3RhY2tfb2IiLCJzdWIiOiI2MTA1MDM2IiwiZ3JvdXBfaWQiOjQ2OTIyNTksInVzZXJfaWQiOjYxMDUwMzYsImJ1aWxkX2hhc2hlZF9pZCI6IjkxdTlhZXYwaGxsanJ4YndkZGNuZHluZnBvOTF4dm9ibHQ3b2xncXEiLCJob29rX2FzX3Rlc3QiOiIxIiwiYnVpbGRfbmFtZSI6IldFQkRSSVZFUklPIiwicHJvZHVjdF9tYXAiOiJ7XCJvYnNlcnZhYmlsaXR5XCI6dHJ1ZSxcIm9yaWdpbkZyb21Qcm9kdWN0TWFwXCI6XCJVbmtub3duR3JpZFwiLFwiYnN0YWNrQXV0b21hdGlvblwiOmZhbHNlLFwicHJvZHVjdEZpbHRlclNvdXJjZVwiOmZhbHNlLFwiY2FkXCI6dHJ1ZX0iLCJncnJfcmVnaW9uIjoiIiwic2lnbmluZ19rZXlfaGFzaCI6IjdkZjZlNjgzYzY3MDkxYjZiY2FiNDk1ZTNmN2YyYWExNjljNzVmMzFmYmFmYTUwZjQ3MDI0YzgxYjllNzA1M2QiLCJpYXQiOjE3Mzk5NDQ1MTEsImV4cCI6MTc0MDI5MDExMX0.mv2fodtX2XFFBDi9DqkucO5qAUhheDp5wyP8Ful3Hmk","allow_screenshots":true}
30
+ 2025-02-19T05:55:11.108Z INFO @wdio/browserstack-service browserstackLocal is not enabled - skipping...
31
+ 2025-02-19T05:55:21.571Z DEBUG @wdio/browserstack-service teardown started
32
+ 2025-02-19T05:55:21.571Z DEBUG @wdio/browserstack-service teardown ended
33
+ 2025-02-19T05:55:22.180Z DEBUG @wdio/browserstack-service Inside OnComplete hook..
34
+ 2025-02-19T05:55:22.180Z DEBUG @wdio/browserstack-service Sending stop launch event
35
+ 2025-02-19T05:55:23.169Z DEBUG @wdio/browserstack-service [STOP_BUILD] Success response:
36
+ 2025-02-19T05:55:23.170Z DEBUG @wdio/browserstack-service Reading worker file worker-data-13538.json
37
+ 2025-02-19T05:55:23.175Z DEBUG @wdio/browserstack-service Sending SDK event with data {
38
+ userName: 'subhrasubudhi_uf8nhj',
39
+ accessKey: 'DUGGqze7p9QMZb84y66s',
40
+ event_type: 'SDKTestSuccessful',
41
+ detectedFramework: 'WebdriverIO-mocha',
42
+ event_properties: {
43
+ language_framework: 'WebdriverIO_mocha',
44
+ referrer: 'WebdriverIO-mocha/9.0.8',
45
+ language: 'WebdriverIO',
46
+ languageVersion: 'v20.15.0',
47
+ buildName: 'undefined',
48
+ buildIdentifier: 'undefined',
49
+ os: 'Darwin',
50
+ hostname: 'Subhras-MacBook-Pro.local',
51
+ productMap: {
52
+ observability: true,
53
+ accessibility: false,
54
+ percy: false,
55
+ automate: true,
56
+ app_automate: false
57
+ },
58
+ product: [ 'observability', 'automate' ],
59
+ productUsage: {
60
+ testObservability: {
61
+ enabled: true,
62
+ manuallySet: false,
63
+ buildHashedId: '91u9aev0hlljrxbwddcndynfpo91xvoblt7olgqq',
64
+ events: {
65
+ buildEvents: {
66
+ started: { isTriggered: true, status: 'success', error: undefined },
67
+ finished: { isTriggered: true, status: 'success', error: undefined }
68
+ },
69
+ testEvents: {
70
+ started: { triggeredCount: 0, sentCount: 0, failedCount: 0 },
71
+ finished: { triggeredCount: 0, sentCount: 0, failedCount: 0 }
72
+ },
73
+ hookEvents: {
74
+ started: { triggeredCount: 0, sentCount: 0, failedCount: 0 },
75
+ finished: { triggeredCount: 0, sentCount: 0, failedCount: 0 }
76
+ },
77
+ logEvents: { triggeredCount: 0, sentCount: 0, failedCount: 0 },
78
+ cbtSessionEvents: { triggeredCount: 0, sentCount: 0, failedCount: 0 }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+ 2025-02-19T05:55:24.307Z DEBUG @wdio/browserstack-service Funnel Event Response: "{\"message\":\"SDK Event recorded successfully\"}"
85
+ 2025-02-19T05:55:24.307Z DEBUG @wdio/browserstack-service Funnel event success
86
+ 2025-02-19T05:55:24.314Z DEBUG @wdio/browserstack-service Failed to fire api request due to TypeError: fetch failed - TypeError: fetch failed
87
+ at node:internal/deps/undici/undici:12502:13
88
+ at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
89
+ at async nodeRequest (file:///Users/subhrasubudhi/WORKSPACES/WEBDRIVERIO/YTL_AF/WEBDRIVERIO/node_modules/@wdio/browserstack-service/build/index.js:880:22)
90
+ at async uploadLogs (file:///Users/subhrasubudhi/WORKSPACES/WEBDRIVERIO/YTL_AF/WEBDRIVERIO/node_modules/@wdio/browserstack-service/build/index.js:1808:20)
91
+ at async BrowserstackLauncherService._uploadServiceLogs (file:///Users/subhrasubudhi/WORKSPACES/WEBDRIVERIO/YTL_AF/WEBDRIVERIO/node_modules/@wdio/browserstack-service/build/index.js:3299:22)
92
+ at async BrowserstackLauncherService.onComplete (file:///Users/subhrasubudhi/WORKSPACES/WEBDRIVERIO/YTL_AF/WEBDRIVERIO/node_modules/@wdio/browserstack-service/build/index.js:3175:7)
93
+ at async file:///Users/subhrasubudhi/WORKSPACES/WEBDRIVERIO/YTL_AF/WEBDRIVERIO/node_modules/@wdio/cli/build/index.js:1208:9
94
+ at async Promise.all (index 0)
95
+ at async Launcher.run (file:///Users/subhrasubudhi/WORKSPACES/WEBDRIVERIO/YTL_AF/WEBDRIVERIO/node_modules/@wdio/cli/build/index.js:2200:7)
96
+ at async Module.run (file:///Users/subhrasubudhi/WORKSPACES/WEBDRIVERIO/YTL_AF/WEBDRIVERIO/node_modules/@wdio/cli/build/index.js:3217:16)
97
+ 2025-02-19T05:55:24.314Z DEBUG @wdio/browserstack-service Response - undefined
@@ -1 +1 @@
1
- {"userName":"subhrasubudhi_uf8nhj","accessKey":"RFVHR3F6ZTdwOVFNWmI4NHk2NnM=","event_type":"SDKTestSuccessful","detectedFramework":"WebdriverIO-mocha","event_properties":{"language_framework":"WebdriverIO_mocha","referrer":"WebdriverIO-mocha/9.0.8","language":"WebdriverIO","languageVersion":"v20.15.0","buildName":"undefined","buildIdentifier":"undefined","os":"Darwin","hostname":"Subhras-MacBook-Pro.local","productMap":{"observability":true,"accessibility":false,"percy":false,"automate":true,"app_automate":false},"product":["observability","automate"],"productUsage":{"testObservability":{"enabled":true,"manuallySet":false,"events":{"buildEvents":{"started":{"isTriggered":true},"finished":{"isTriggered":true,"status":"failed","error":"Token/buildID is undefined, build creation might have failed"}},"testEvents":{"started":{"triggeredCount":0,"sentCount":0,"failedCount":0},"finished":{"triggeredCount":0,"sentCount":0,"failedCount":0}},"hookEvents":{"started":{"triggeredCount":0,"sentCount":0,"failedCount":0},"finished":{"triggeredCount":0,"sentCount":0,"failedCount":0}},"logEvents":{"triggeredCount":0,"sentCount":0,"failedCount":0},"cbtSessionEvents":{"triggeredCount":0,"sentCount":0,"failedCount":0}}}}}}
1
+ {"userName":"subhrasubudhi_uf8nhj","accessKey":"DUGGqze7p9QMZb84y66s","event_type":"SDKTestSuccessful","detectedFramework":"WebdriverIO-mocha","event_properties":{"language_framework":"WebdriverIO_mocha","referrer":"WebdriverIO-mocha/9.0.8","language":"WebdriverIO","languageVersion":"v20.15.0","buildName":"undefined","buildIdentifier":"undefined","os":"Darwin","hostname":"Subhras-MacBook-Pro.local","productMap":{"observability":true,"accessibility":false,"percy":false,"automate":true,"app_automate":false},"product":["observability","automate"],"productUsage":{"testObservability":{"enabled":true,"manuallySet":false,"events":{"buildEvents":{"started":{},"finished":{}},"testEvents":{"started":{"triggeredCount":0,"sentCount":0,"failedCount":0},"finished":{"triggeredCount":0,"sentCount":0,"failedCount":0}},"hookEvents":{"started":{"triggeredCount":0,"sentCount":0,"failedCount":0},"finished":{"triggeredCount":0,"sentCount":0,"failedCount":0}},"logEvents":{"triggeredCount":0,"sentCount":0,"failedCount":0},"cbtSessionEvents":{"triggeredCount":0,"sentCount":0,"failedCount":0}}}}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.67",
3
+ "version": "3.0.69",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",
@@ -0,0 +1,14 @@
1
+ const Util = require('../config/dataHandler.js');
2
+
3
+ describe("login testops", () => {
4
+ it("tests login testops", async () => {
5
+ await browser.url("https://uatrvrd.frothtestops.com/login")
6
+ await expect(browser).toHaveUrl("https://uatrvrd.frothtestops.com/login")
7
+ await browser.$("aria/Enter Email").click()
8
+ await browser.$("aria/Enter Email").setValue("admin@roboticodigital.com")
9
+ await browser.$("aria/Enter Password").click()
10
+ await browser.$("aria/Enter Password").setValue("Welcome@123")
11
+ await browser.$("aria/Login").click()
12
+ await browser.$("#vertical-menu-btn").click()
13
+ });
14
+ });
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ tests: [
3
+ '../web/testops_login.js'
4
+ ]
5
+ };
@@ -1,4 +1,4 @@
1
- app: "bs://ac6af6ff949d8b320a5a668244442f38a9f3edce"
1
+ app: ""
2
2
  userName: subhrasubudhi_uf8nhj
3
3
  accessKey: DUGGqze7p9QMZb84y66s
4
4
  platformName: android
@@ -13,5 +13,5 @@ deviceOrientation: "landscape"
13
13
  networkLogs: true
14
14
  debug: true
15
15
  appProfiling: true
16
-
16
+ browserstack.uploadMedia: ["media://efd818ab0b4617a5af8d2d16dfdb29b03d28d4be","media://efd818ab0b4617a5af8d2d16dfdb29b03d28d4be"]
17
17
 
@@ -0,0 +1,13 @@
1
+ userName: naveen_OSt3Pw
2
+ accessKey: AuzPy8cHZ7sCBmMXakKe
3
+ platformName: MAC
4
+ browserName: Safari
5
+ os: OS X
6
+ osVersion: Monterey
7
+ browserVersion: 15.6
8
+ buildIdentifier: ${BUILD_NUMBER}
9
+ consoleLogs: info
10
+ browserstackLocal: true
11
+ debug: true
12
+ networkLogs: true
13
+