froth-webdriverio-framework 6.0.41 → 6.0.42

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.
@@ -0,0 +1,219 @@
1
+ async function swipeleft(selector, xoffset, speedinsec) {
2
+ try {
3
+ console.log('Swiping left');
4
+
5
+ if (xoffset == null) {
6
+ driver.swipeLeft(selector, speedinsec);
7
+ } else {
8
+ driver.swipeLeft(selector, xoffset, speedinsec);
9
+ }
10
+ } catch (error) {
11
+ console.error(error.message);
12
+ }
13
+
14
+ }
15
+
16
+ async function swiperight(selector, xoffset, speedinsec) {
17
+ try {
18
+ console.log('Swiping right');
19
+
20
+ if (xoffset == null) {
21
+ driver.swipeRight(selector, speedinsec);
22
+ } else {
23
+ driver.swipeRight(selector, xoffset, speedinsec);
24
+ }
25
+ } catch (error) {
26
+ console.error(error.message);
27
+ }
28
+
29
+ }
30
+
31
+ async function swipeup(selector, yoffset, speedinsec) {
32
+ try {
33
+ console.log('Swiping up');
34
+
35
+ if (yoffset == null) {
36
+ driver.swipeUp(selector, speedinsec);
37
+ } else {
38
+ driver.swipeUp(selector, yoffset, speedinsec);
39
+ }
40
+ } catch (error) {
41
+ console.error(error.message);
42
+ }
43
+ }
44
+
45
+ async function swipedown(selector, yoffset, speedinsec) {
46
+ try {
47
+ console.log('Swiping down');
48
+
49
+ if (yoffset == null) {
50
+ driver.swipeDown(selector, speedinsec);
51
+ } else {
52
+ driver.swipeDown(selector, yoffset, speedinsec);
53
+ }
54
+ } catch (error) {
55
+ console.error(error.message);
56
+ }
57
+ }
58
+
59
+ async function swipewithcoordinates(StartX, StartY, EndX, EndY) {
60
+
61
+ await driver.performActions([
62
+ {
63
+ type: "pointer",
64
+ id: "finger1",
65
+ parameters: { pointerType: "touch" },
66
+ actions: [
67
+ { type: "pointerMove", duration: 0, x: StartX, y: StartY },
68
+ { type: "pointerDown", button: 0 },
69
+ { type: "pause", duration: 300 },
70
+ { type: "pointerMove", duration: 1000, x: EndX, y: EndY },
71
+ { type: "pointerUp", button: 0 }
72
+ ],
73
+ }
74
+ ]);
75
+ }
76
+ async function swipetofit() {
77
+ // Get screen size dynamically
78
+ const screenSize = await driver.getWindowRect();
79
+ const screenWidth = screenSize.width;
80
+ const screenHeight = screenSize.height;
81
+
82
+ console.log(`Screen Size: Width=${screenWidth}, Height=${screenHeight}`);
83
+
84
+ // Define approximate positions for corners
85
+ const topRightStartX = screenWidth * 0.88; // Top-right corner
86
+ const topRightStartY = screenHeight * 0.44;
87
+
88
+ const topRightEndX = screenWidth * 0.96; // Expand to the right
89
+ const topRightEndY = screenHeight * 0.39; // Move upwards slightly
90
+
91
+ const bottomLeftStartX = screenWidth * 0.12; // Bottom-left corner
92
+ const bottomLeftStartY = screenHeight * 0.69;
93
+
94
+ const bottomLeftEndX = screenWidth * 0.014; // Expand to the left
95
+ const bottomLeftEndY = screenHeight * 0.73; // Move down slightly
96
+
97
+ console.log(`Resizing top-right from (${topRightStartX}, ${topRightStartY}) to (${topRightEndX}, ${topRightEndY})`);
98
+ console.log(`Resizing bottom-left from (${bottomLeftStartX}, ${bottomLeftStartY}) to (${bottomLeftEndX}, ${bottomLeftEndY})`);
99
+
100
+ // Resize from top-right corner
101
+ await driver.performActions([
102
+ {
103
+ type: "pointer",
104
+ id: "finger1",
105
+ parameters: { pointerType: "touch" },
106
+ actions: [
107
+ { type: "pointerMove", duration: 0, x: topRightStartX, y: topRightStartY },
108
+ { type: "pointerDown", button: 0 },
109
+ { type: "pause", duration: 300 },
110
+ { type: "pointerMove", duration: 1000, x: topRightEndX, y: topRightEndY },
111
+ { type: "pointerUp", button: 0 }
112
+ ],
113
+ }
114
+ ]);
115
+
116
+ // Resize from bottom-left corner
117
+ await driver.performActions([
118
+ {
119
+ type: "pointer",
120
+ id: "finger2",
121
+ parameters: { pointerType: "touch" },
122
+ actions: [
123
+ { type: "pointerMove", duration: 0, x: bottomLeftStartX, y: bottomLeftStartY },
124
+ { type: "pointerDown", button: 0 },
125
+ { type: "pause", duration: 300 },
126
+ { type: "pointerMove", duration: 1000, x: bottomLeftEndX, y: bottomLeftEndY },
127
+ { type: "pointerUp", button: 0 }
128
+ ],
129
+ }
130
+ ]);
131
+
132
+ console.log("✅ Crop overlay resized from two corners successfully!");
133
+ }
134
+
135
+ // async function swipetofit(TopRStartXpct, TopRStartYpct, TopREndXpct, TopREndYpct, BottomLStartXpct, BottomLStartYpct, BottomLEndXpct, BottomLEndYpct) {
136
+
137
+ // let topRightStartX; // Top-right corner
138
+ // let topRightStartY;
139
+
140
+ // let topRightEndX; // Expand to the right
141
+ // let topRightEndY; // Move upwards slightly
142
+
143
+ // let bottomLeftStartX; // Bottom-left corner
144
+ // let bottomLeftStartY;
145
+
146
+ // let bottomLeftEndX; // Expand to the left
147
+ // let bottomLeftEndY;
148
+
149
+ // // Get screen size dynamically
150
+ // const screenSize = await driver.getWindowRect();
151
+ // const screenWidth = screenSize.width;
152
+ // const screenHeight = screenSize.height;
153
+
154
+ // console.log(`Screen Size: Width=${screenWidth}, Height=${screenHeight}`);
155
+ // // Define approximate positions for corners
156
+
157
+ // if (TopRStartXpct === null) {// default calucaltion
158
+ // topRightStartX = screenWidth * 0.88; // Top-right corner
159
+ // topRightStartY = screenHeight * 0.44;
160
+
161
+ // topRightEndX = screenWidth * 0.96; // Expand to the right
162
+ // topRightEndY = screenHeight * 0.39; // Move upwards slightly
163
+
164
+ // bottomLeftStartX = screenWidth * 0.12; // Bottom-left corner
165
+ // bottomLeftStartY = screenHeight * 0.69;
166
+
167
+ // bottomLeftEndX = screenWidth * 0.014; // Expand to the left
168
+ // bottomLeftEndY = screenHeight * 0.73;
169
+ // } else {
170
+ // topRightStartX = screenWidth * (TopRStartXpct / 100); // Top-right corner
171
+ // topRightStartY = screenHeight * (TopRStartYpct / 100);
172
+
173
+ // topRightEndX = screenWidth * (TopREndXpct / 100); // Expand to the right
174
+ // topRightEndY = screenHeight * (TopREndYpct / 100); // Move upwards slightly
175
+
176
+ // bottomLeftStartX = screenWidth * (BottomLStartXpct / 100); // Bottom-left corner
177
+ // bottomLeftStartY = screenHeight * (BottomLStartYpct / 100);
178
+
179
+ // bottomLeftEndX = screenWidth * (BottomLEndXpct / 100); // Expand to the left
180
+ // bottomLeftEndY = screenHeight * (BottomLEndYpct / 100); // Move down slightly
181
+ // }
182
+ // console.log(`Resizing top-right from (${topRightStartX}, ${topRightStartY}) to (${topRightEndX}, ${topRightEndY})`);
183
+ // console.log(`Resizing bottom-left from (${bottomLeftStartX}, ${bottomLeftStartY}) to (${bottomLeftEndX}, ${bottomLeftEndY})`);
184
+
185
+ // // Resize from top-right corner
186
+ // await driver.performActions([
187
+ // {
188
+ // type: "pointer",
189
+ // id: "finger1",
190
+ // parameters: { pointerType: "touch" },
191
+ // actions: [
192
+ // { type: "pointerMove", duration: 0, x: topRightStartX, y: topRightStartY },
193
+ // { type: "pointerDown", button: 0 },
194
+ // { type: "pause", duration: 300 },
195
+ // { type: "pointerMove", duration: 1000, x: topRightEndX, y: topRightEndY },
196
+ // { type: "pointerUp", button: 0 }
197
+ // ],
198
+ // }
199
+ // ]);
200
+
201
+ // // Resize from bottom-left corner
202
+ // await driver.performActions([
203
+ // {
204
+ // type: "pointer",
205
+ // id: "finger2",
206
+ // parameters: { pointerType: "touch" },
207
+ // actions: [
208
+ // { type: "pointerMove", duration: 0, x: bottomLeftStartX, y: bottomLeftStartY },
209
+ // { type: "pointerDown", button: 0 },
210
+ // { type: "pause", duration: 300 },
211
+ // { type: "pointerMove", duration: 1000, x: bottomLeftEndX, y: bottomLeftEndY },
212
+ // { type: "pointerUp", button: 0 }
213
+ // ],
214
+ // }
215
+ // ]);
216
+
217
+ // console.log("✅ Crop overlay resized from two corners successfully!");
218
+ // }
219
+ module.exports = { swipeleft, swipedown, swiperight, swipeup, swipetofit, swipewithcoordinates };
@@ -8,6 +8,7 @@ const exeDetails = require("../froth_api_calls/getexecutionDetails")
8
8
  const getBSSessionDetails = require("../froth_api_calls/browsersatckSessionInfo").getBSSessionDetails;
9
9
  const { fail } = require("assert");
10
10
  const { error } = require('console');
11
+ global.Util=require('../froth_common_actions/Utils');
11
12
  //const isBrowserStackEnabled = process.env.BROWSERSTACK;
12
13
  let starttime;
13
14
  let endtime;
@@ -10,8 +10,8 @@ exports.config = {
10
10
  'browserstack',
11
11
  {
12
12
  buildIdentifier: '${BUILD_NUMBER}',
13
- browserstackLocal: false,
14
- opts: { forcelocal: false, localIdentifier: "webdriverio-appium-app-browserstack-android-repo" },
13
+ browserstackLocal: true,
14
+ opts: { forcelocal: true, localIdentifier: "webdriverio-appium-app-browserstack-android-repo" },
15
15
  app: process.env.BROWSERSTACK_APP_PATH || 'bs://30fdf3a163d0bad126f64a3d5713e9ab0086a41e'
16
16
  }
17
17
  ]
package/local.log ADDED
@@ -0,0 +1,8 @@
1
+
2
+
3
+ Sat Dec 13 2025 12:50:48:482 GMT+0800 (+08) -- Starting configuration console on http://localhost:45454
4
+ Sat Dec 13 2025 12:50:50:514 GMT+0800 (+08) -- [SUCCESS] You can now access your local server(s) in our remote browser
5
+
6
+ Sat Dec 13 2025 12:50:51:123 GMT+0800 (+08) -- Press Ctrl-C to exit
7
+
8
+
@@ -0,0 +1,212 @@
1
+ [
2
+ {
3
+ "name": "sdk:testhub",
4
+ "entryType": "measure",
5
+ "startTime": 607.891832023859,
6
+ "duration": 1394.401622980833,
7
+ "detail": null,
8
+ "success": true,
9
+ "failure": null,
10
+ "worker": 70108
11
+ },
12
+ {
13
+ "name": "sdk:percy",
14
+ "entryType": "measure",
15
+ "startTime": 2006.6729610264301,
16
+ "duration": 813.4349739849567,
17
+ "detail": null,
18
+ "success": false,
19
+ "failure": {},
20
+ "worker": 70108
21
+ },
22
+ {
23
+ "name": "sdk:automate:local",
24
+ "entryType": "measure",
25
+ "startTime": 2820.8617390096188,
26
+ "duration": 0.6367210149765015,
27
+ "detail": null,
28
+ "success": true,
29
+ "failure": null,
30
+ "worker": 70108
31
+ },
32
+ {
33
+ "name": "sdk:automate:hub-management",
34
+ "entryType": "measure",
35
+ "startTime": 6646.372212022543,
36
+ "duration": 2418.3285439908504,
37
+ "detail": null,
38
+ "success": true,
39
+ "failure": null,
40
+ "worker": 70108
41
+ },
42
+ {
43
+ "name": "sdk:automate:print-buildlink",
44
+ "entryType": "measure",
45
+ "startTime": 32515.78630000353,
46
+ "duration": 692.1262010037899,
47
+ "detail": null,
48
+ "success": true,
49
+ "failure": null,
50
+ "worker": 70108
51
+ },
52
+ {
53
+ "name": "sdk:testhub",
54
+ "entryType": "measure",
55
+ "startTime": 924.9215289950371,
56
+ "duration": 948.485738992691,
57
+ "detail": null,
58
+ "success": true,
59
+ "failure": null,
60
+ "worker": 71160
61
+ },
62
+ {
63
+ "name": "sdk:percy",
64
+ "entryType": "measure",
65
+ "startTime": 1877.7676609754562,
66
+ "duration": 1621.3099920153618,
67
+ "detail": null,
68
+ "success": false,
69
+ "failure": {},
70
+ "worker": 71160
71
+ },
72
+ {
73
+ "name": "sdk:automate:local",
74
+ "entryType": "measure",
75
+ "startTime": 3499.466672986746,
76
+ "duration": 0.28579598665237427,
77
+ "detail": null,
78
+ "success": true,
79
+ "failure": null,
80
+ "worker": 71160
81
+ },
82
+ {
83
+ "name": "sdk:automate:hub-management",
84
+ "entryType": "measure",
85
+ "startTime": 7114.496829986572,
86
+ "duration": 2225.540565997362,
87
+ "detail": null,
88
+ "success": true,
89
+ "failure": null,
90
+ "worker": 71160
91
+ },
92
+ {
93
+ "name": "sdk:automate:print-buildlink",
94
+ "entryType": "measure",
95
+ "startTime": 35875.0202820003,
96
+ "duration": 800.7642799913883,
97
+ "detail": null,
98
+ "success": true,
99
+ "failure": null,
100
+ "worker": 71160
101
+ },
102
+ {
103
+ "name": "sdk:testhub",
104
+ "entryType": "measure",
105
+ "startTime": 687.2150489985943,
106
+ "duration": 884.2408460080624,
107
+ "detail": null,
108
+ "success": true,
109
+ "failure": null,
110
+ "worker": 72247
111
+ },
112
+ {
113
+ "name": "sdk:percy",
114
+ "entryType": "measure",
115
+ "startTime": 1576.0248839855194,
116
+ "duration": 829.310939013958,
117
+ "detail": null,
118
+ "success": false,
119
+ "failure": {},
120
+ "worker": 72247
121
+ },
122
+ {
123
+ "name": "sdk:automate:local",
124
+ "entryType": "measure",
125
+ "startTime": 2406.459338992834,
126
+ "duration": 0.5995680093765259,
127
+ "detail": null,
128
+ "success": true,
129
+ "failure": null,
130
+ "worker": 72247
131
+ },
132
+ {
133
+ "name": "sdk:automate:hub-management",
134
+ "entryType": "measure",
135
+ "startTime": 4708.3077020049095,
136
+ "duration": 2346.1451799869537,
137
+ "detail": null,
138
+ "success": true,
139
+ "failure": null,
140
+ "worker": 72247
141
+ },
142
+ {
143
+ "name": "sdk:automate:print-buildlink",
144
+ "entryType": "measure",
145
+ "startTime": 55882.94255799055,
146
+ "duration": 657.3745210170746,
147
+ "detail": null,
148
+ "success": true,
149
+ "failure": null,
150
+ "worker": 72247
151
+ },
152
+ {
153
+ "name": "sdk:testhub",
154
+ "entryType": "measure",
155
+ "startTime": 551.693863004446,
156
+ "duration": 1102.3266699910164,
157
+ "detail": null,
158
+ "success": true,
159
+ "failure": null,
160
+ "worker": 73218
161
+ },
162
+ {
163
+ "name": "sdk:percy",
164
+ "entryType": "measure",
165
+ "startTime": 1658.9184350073338,
166
+ "duration": 635.5259799957275,
167
+ "detail": null,
168
+ "success": false,
169
+ "failure": {},
170
+ "worker": 73218
171
+ },
172
+ {
173
+ "name": "sdk:proxy-setup",
174
+ "entryType": "measure",
175
+ "startTime": 2295.8406440019608,
176
+ "duration": 0.04477199912071228,
177
+ "detail": null,
178
+ "success": true,
179
+ "failure": null,
180
+ "worker": 73218
181
+ },
182
+ {
183
+ "name": "sdk:automate:local",
184
+ "entryType": "measure",
185
+ "startTime": 2295.194568991661,
186
+ "duration": 5505.715487003326,
187
+ "detail": null,
188
+ "success": true,
189
+ "failure": null,
190
+ "worker": 73218
191
+ },
192
+ {
193
+ "name": "sdk:automate:hub-management",
194
+ "entryType": "measure",
195
+ "startTime": 12060.374924004078,
196
+ "duration": 2035.4689979851246,
197
+ "detail": null,
198
+ "success": true,
199
+ "failure": null,
200
+ "worker": 73218
201
+ },
202
+ {
203
+ "name": "sdk:automate:print-buildlink",
204
+ "entryType": "measure",
205
+ "startTime": 78211.97738298774,
206
+ "duration": 312.21828001737595,
207
+ "detail": null,
208
+ "success": true,
209
+ "failure": null,
210
+ "worker": 73218
211
+ }
212
+ ]