froth-webdriverio-framework 3.0.75 → 3.0.77

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.
@@ -9,9 +9,10 @@ const PLATFORM = process.env.PLATFORM || 'browserstack';
9
9
  const configFile = PLATFORM === 'browserstack' ? './ymls/browserstack/' + process.env.YML_NAME : '../ymls/saucelab/' + process.env.YML_NAME;
10
10
  console.log('PLATFORM:', PLATFORM);
11
11
  // Load YAML file
12
- //const capabilities = yaml.load(fs.readFileSync(path.join(__dirname, configFile), 'utf8'));
13
- const capabilities = yaml.load(fs.readFileSync(path.join(configFile), 'utf8'));
14
- const SUITE_FILE = yaml.load(fs.readFileSync(path.join(process.env.SUITE), 'utf8'));
12
+ const capabilities = yaml.load(fs.readFileSync(path.join(path.resolve(process.cwd(),configFile)), 'utf8'));
13
+ const SUITE_FILE = path.resolve(process.cwd(), process.env.SUITE);
14
+
15
+ //const SUITE_FILE = process.env.SUITE;
15
16
  console.log('SUITE_FILE:', SUITE_FILE);
16
17
 
17
18
  capabilities.buildName = process.env.BROWSERSTACK_BUILD_NAME;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.75",
3
+ "version": "3.0.77",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",
@@ -32,12 +32,11 @@
32
32
  "@wdio/mocha-framework": "^8.36.1",
33
33
  "@wdio/spec-reporter": "^8.36.1",
34
34
  "appium": "^2.15.0",
35
- "appium-uiautomator2-driver": "^2.2.0",
35
+ "appium-uiautomator2-driver": "^4.0.1",
36
36
  "assert": "^2.1.0",
37
37
  "axios": "^1.7.7",
38
38
  "browserstack-local": "^1.5.5",
39
39
  "chai": "^5.1.1",
40
-
41
40
  "crypto-js": "^4.2.0",
42
41
  "deepmerge": "^4.3.1",
43
42
  "form-data": "^4.0.0",
@@ -1,23 +0,0 @@
1
- name: npm_package
2
-
3
- on:
4
- workflow_dispatch:
5
-
6
- jobs:
7
- release:
8
- name: release
9
- runs-on: ubuntu-latest
10
- steps:
11
- - name: Checkout code
12
- uses: actions/checkout@v2
13
- - name: Setup Node.js
14
- uses: actions/setup-node@v2
15
- with:
16
- node-version: '12.x'
17
- registry-url: https://registry.npmjs.org
18
-
19
- - name: Publish to npm
20
- run: npm publish --access public
21
- env:
22
- NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
23
-
@@ -1,199 +0,0 @@
1
- const Util = require('../config/dataHandler.js');
2
-
3
- describe('Yes Shop Prepaid Registration', () => {
4
-
5
- it('Yes Shop Prepaid Registration', async () => {
6
-
7
- // File URLs from BrowserStack
8
- const idCardFileUrl = "https://drive.google.com/file/d/1t5KZ7a6JLS97khFnuUS-_aOa6EY4a9H0/view?usp=sharing"; // Replace with actual file ID for ID card
9
- const videoFileUrl = "https://drive.google.com/file/d/1PYMY2LQ-GFFKJ1wC5yRNflcxfA3ATgvW/view?usp=sharing"; // Replace with actual file ID for video
10
- const el1 = await driver.$("id:com.ytlcomms.ymca:id/yesLogoIv");
11
- await el1.click();
12
- await el1.click();
13
- await el1.click();
14
- await el1.click();
15
- await el1.click();
16
- await el1.click();
17
- await el1.click();
18
- await el1.click();
19
- await el1.click();
20
- await el1.click();
21
- const el2 = await driver.$("id:com.ytlcomms.ymca:id/etBetaUserId");
22
- await el2.addValue("alpha_login");
23
- const el3 = await driver.$("id:com.ytlcomms.ymca:id/etBetaUserPass");
24
- await el3.addValue("@45kj*3d");
25
- const el411 = await driver.$("id:com.ytlcomms.ymca:id/btBetaSignIn");
26
- await el411.click();
27
- const el51 = await driver.$("id:com.ytlcomms.ymca:id/iotUrl");
28
- await el51.click();
29
- /*To scroll to the down of the screen until text is visible */
30
- await Util.F.scrollDownToView("GO BACK")
31
-
32
- const el61 = await driver.$("id:com.ytlcomms.ymca:id/btGoBack");
33
- await el61.click();
34
- const el71 = await driver.$("id:com.ytlcomms.ymca:id/mUserId");
35
- await el71.addValue("pdc_branch");
36
- const el81 = await driver.$("id:com.ytlcomms.ymca:id/mPassword");
37
- await el81.addValue("ytlc@xm1234");
38
- const el91 = await driver.$("id:com.ytlcomms.ymca:id/btSignIn");
39
- await el91.click();
40
- // Start the automation script
41
- const el4 = await driver.$("-android uiautomator:new UiSelector().text(\"Registration\")");
42
- await el4.click();
43
-
44
- const el5 = await driver.$("-android uiautomator:new UiSelector().text(\"Prepaid\")");
45
- await el5.click();
46
-
47
- // Trigger ID card upload
48
- const el6 = await driver.$("id:com.ytlcomms.ymca:id/ekycMyKadBtn");
49
- await el6.click();
50
-
51
- const el7 = await driver.$("id:com.android.permissioncontroller:id/permission_allow_one_time_button");
52
- await el7.click();
53
-
54
- const el8 = await driver.$("id:com.ytlcomms.ymca:id/ekycMyKadBtn");
55
- await el8.click();
56
-
57
- const el9 = await driver.$("id:com.ytlcomms.ymca:id/skipBtn");
58
- await el9.click();
59
-
60
- const el10 = await driver.$("id:com.ytlcomms.ymca:id/selectCountryBtn");
61
- await el10.click();
62
-
63
- await driver.execute('browserstack_executor: {"action":"cameraImageInjection", "arguments": {"imageUrl" : "media://b44ff746563b5e458e2b5034d3cb25263ad24ebd"}}');
64
-
65
- const el11 = await driver.$("id:com.ytlcomms.ymca:id/confirmBtn");
66
- await el11.click();
67
- await driver.pause(3000)
68
-
69
- const el12 = await driver.$("id:com.sec.android.app.camera:id/bottom_background");
70
- await el12.click();
71
-
72
- await driver.pause(3000)
73
-
74
- ////android.widget.Button[@resource-id="com.sec.android.app.camera:id/okay"]
75
-
76
- const el13 = await driver.$("//android.widget.Button[@resource-id='com.sec.android.app.camera:id/okay']");
77
- await el13.click();
78
- // const el29 = await driver.$("id:com.ytlcomms.ymca:id/selectCountryBtn");
79
- // await el29.click();
80
-
81
- await driver.pause(10000)
82
- try {
83
- await driver.action('pointer')
84
- .move({
85
- duration: 0,
86
- x: 937,
87
- y: 905
88
- })
89
- .down({
90
- button: 0
91
- })
92
- .move({
93
- duration: 1000,
94
- x: 1043,
95
- y: 696
96
- })
97
- .up({
98
- button: 0
99
- })
100
- .perform();
101
-
102
-
103
- } catch (e) {
104
- console.error('Error in right :', e);
105
-
106
- }
107
- try {
108
- await driver.action('pointer')
109
- .move({
110
- duration: 0,
111
- x: 134,
112
- y: 1498
113
- })
114
- .down({
115
- button: 0
116
- })
117
- .move({
118
- duration: 1000,
119
- x: 28,
120
- y: 1723
121
- })
122
- .up({
123
- button: 0
124
- })
125
- .perform();
126
-
127
- //
128
- } catch (e) {
129
- console.error('Error in left:', e);
130
-
131
- }
132
- await driver.pause(10000) // Confirm upload
133
-
134
- const el16 = await driver.$("//android.widget.TextView[@text='Done']");
135
- await el16.click();
136
-
137
- await driver.pause(30000)
138
- const el17 = await driver.$("id:com.ytlcomms.ymca:id/newRb");
139
- await el17.click();
140
-
141
- await Util.F.scrollDownToView("Facial Recognition")
142
-
143
- const el18 = await driver.$("id:com.ytlcomms.ymca:id/frRecognitionBtn");
144
- await el18.click();
145
- const el19 = await driver.$("id:com.ytlcomms.ymca:id/skipBtn");
146
- await el19.click();
147
-
148
- await driver.execute('browserstack_executor: {"action":"cameraVideoInjection", "arguments": {"videoUrl" : "media://1920c80136e1c7e2278e15d820845ed64a676e92"}}');
149
-
150
- const el20 = await driver.$("id:com.ytlcomms.ymca:id/startBtn");
151
- await el20.click();
152
-
153
- await driver.pause(3000)
154
-
155
- const el21 = await driver.$("id:com.ytlcomms.ymca:id/captureVideo");
156
- await el21.click();
157
-
158
- await driver.pause(10000)
159
-
160
- ////android.widget.Button[@resource-id="com.sec.android.app.camera:id/okay"]
161
-
162
- // const el13 = await driver.$("//android.widget.Button[@resource-id='com.sec.android.app.camera:id/okay']");
163
- // await el13.click();
164
- //99999999
165
-
166
-
167
- // Trigger video upload for face recognition
168
- // const el18 = await driver.$("id:com.ytlcomms.ymca:id/frRecognitionBtn");
169
- // await el18.click();
170
- // await driver.execute("mobile: uploadFile", { file: videoFileUrl }); // Upload video
171
-
172
- // Complete the remaining flow
173
- const el25 = await driver.$("-android uiautomator:new UiSelector().text('-- PLAN --')");
174
- await el25.click();
175
-
176
- const el26 = await driver.$("-android uiautomator:new UiSelector().text('YES 5G Prepaid')");
177
- await el26.click();
178
-
179
- const el44 = await driver.$("id:com.ytlcomms.ymca:id/submitBtn");
180
- await el44.click();
181
-
182
- const el40 = await driver.$("id:com.ytlcomms.ymca:id/eSimRb");
183
- await el40.click();
184
- const el41 = await driver.$("id:com.ytlcomms.ymca:id/optionalMobTitleLabel");
185
- await el41.click();
186
- //add scroll here
187
-
188
- const el42 = await driver.$("-android uiautomator:new UiSelector().text('01117242402')");
189
- await el42.click();
190
- const el43 = await driver.$("id:com.ytlcomms.ymca:id/md_buttonDefaultPositive");
191
- await el43.click();
192
- //add scroll to end here
193
-
194
- const el45 = await driver.$("id:com.ytlcomms.ymca:id/submitBtn");
195
- await el45.click();
196
-
197
-
198
- });
199
- });
@@ -1,16 +0,0 @@
1
- // iOS Suite: Login and Logout Suite
2
- // const deepmerge = require('deepmerge')
3
- // const androidconfig = require('../config/wdio.common.conf.js');
4
-
5
- // const specconfig = deepmerge.all([androidconfig, {
6
- // specs: [["../android/samplescript.js"]]
7
- // }
8
- // ]);
9
-
10
- module.exports = {
11
- tests: [
12
- '../android/samplescript.js'
13
- ]
14
- };
15
-
16
- //module.exports.config = specconfig;
@@ -1,97 +0,0 @@
1
- 2025-02-19T05:55:09.449Z DEBUG @wdio/browserstack-service Sending SDK event with data {
2
- userName: 'subhrasubudhi_uf8nhj',
3
- accessKey: 'DUGGqze7p9QMZb84y66s',
4
- event_type: 'SDKTestAttempted',
5
- detectedFramework: 'WebdriverIO-mocha',
6
- event_properties: {
7
- language_framework: 'WebdriverIO_mocha',
8
- referrer: 'WebdriverIO-mocha/9.0.8',
9
- language: 'WebdriverIO',
10
- languageVersion: 'v20.15.0',
11
- buildName: 'undefined',
12
- buildIdentifier: 'undefined',
13
- os: 'Darwin',
14
- hostname: 'Subhras-MacBook-Pro.local',
15
- productMap: {
16
- observability: true,
17
- accessibility: false,
18
- percy: false,
19
- automate: true,
20
- app_automate: false
21
- },
22
- product: [ 'observability', 'automate' ]
23
- }
24
- }
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 +0,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}}}}}}
@@ -1,14 +0,0 @@
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
- });
@@ -1,5 +0,0 @@
1
- module.exports = {
2
- tests: [
3
- '../web/testops_login.js'
4
- ]
5
- };
@@ -1,17 +0,0 @@
1
- app: ""
2
- userName: subhrasubudhi_uf8nhj
3
- accessKey: DUGGqze7p9QMZb84y66s
4
- platformName: android
5
- platformVersion: "12.0"
6
- deviceName: Samsung Galaxy S22 Ultra
7
-
8
- buildIdentifier: ${BUILD_NUMBER}
9
-
10
- interactiveDebugging: true
11
- deviceOrientation: "landscape"
12
- #deviceOrientation: "portrait"
13
- networkLogs: true
14
- debug: true
15
- appProfiling: true
16
- browserstack.uploadMedia: ["media://efd818ab0b4617a5af8d2d16dfdb29b03d28d4be","media://efd818ab0b4617a5af8d2d16dfdb29b03d28d4be"]
17
-
@@ -1,13 +0,0 @@
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
-