@sap_oss/wdio-qmate-service 3.9.0 → 3.10.0

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.
Files changed (58) hide show
  1. package/lib/reuse/helper/tableHelper.js +3 -0
  2. package/lib/reuse/helper/tableHelper.js.map +1 -1
  3. package/lib/reuse/index.js +0 -17
  4. package/lib/reuse/index.js.map +1 -1
  5. package/lib/reuse/modules/flp/userSettings.d.ts +2 -0
  6. package/lib/reuse/modules/flp/userSettings.js +6 -1
  7. package/lib/reuse/modules/flp/userSettings.js.map +1 -1
  8. package/lib/reuse/modules/ui5/assertion.d.ts +1 -0
  9. package/lib/reuse/modules/ui5/assertion.js +11 -4
  10. package/lib/reuse/modules/ui5/assertion.js.map +1 -1
  11. package/lib/reuse/modules/ui5/element.d.ts +2 -2
  12. package/lib/reuse/modules/ui5/element.js +7 -4
  13. package/lib/reuse/modules/ui5/element.js.map +1 -1
  14. package/lib/reuse/modules/ui5/session.d.ts +4 -2
  15. package/lib/reuse/modules/ui5/session.js +32 -4
  16. package/lib/reuse/modules/ui5/session.js.map +1 -1
  17. package/lib/reuse/modules/ui5/table.js +25 -9
  18. package/lib/reuse/modules/ui5/table.js.map +1 -1
  19. package/lib/reuse/modules/ui5/userInteraction.d.ts +1 -1
  20. package/lib/reuse/modules/ui5/userInteraction.js +47 -58
  21. package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
  22. package/lib/reuse/modules/util/file.d.ts +5 -3
  23. package/lib/reuse/modules/util/file.js +33 -7
  24. package/lib/reuse/modules/util/file.js.map +1 -1
  25. package/package.json +18 -26
  26. package/reuseApi.json +8 -468
  27. package/test/helper/configurations/base.conf.js +6 -3
  28. package/test/helper/configurations/chrome.headless.conf.js +1 -1
  29. package/test/reuse/ui5/assertion/expectAttributeToBe.spec.js +74 -29
  30. package/test/reuse/ui5/assertion/expectAttributeToContain.spec.js +42 -0
  31. package/test/reuse/ui5/confirmationDialog/clickButton.spec.js +1 -1
  32. package/test/reuse/ui5/confirmationDialog/clickOk.spec.js +1 -1
  33. package/test/reuse/ui5/table/selectRowByValues.spec.js +6 -6
  34. package/test/reuse/ui5/userInteraction/click.spec.js +51 -13
  35. package/test/reuse/ui5/userInteraction/doubleClick.spec.js +1 -1
  36. package/test/reuse/util/file/pdfParser.spec.js +1 -2
  37. package/lib/reuse/modules/mobile/Mobile.d.ts +0 -16
  38. package/lib/reuse/modules/mobile/Mobile.js +0 -23
  39. package/lib/reuse/modules/mobile/Mobile.js.map +0 -1
  40. package/lib/reuse/modules/mobile/android.d.ts +0 -32
  41. package/lib/reuse/modules/mobile/android.js +0 -85
  42. package/lib/reuse/modules/mobile/android.js.map +0 -1
  43. package/lib/reuse/modules/mobile/device.d.ts +0 -173
  44. package/lib/reuse/modules/mobile/device.js +0 -403
  45. package/lib/reuse/modules/mobile/device.js.map +0 -1
  46. package/lib/reuse/modules/mobile/element.d.ts +0 -95
  47. package/lib/reuse/modules/mobile/element.js +0 -185
  48. package/lib/reuse/modules/mobile/element.js.map +0 -1
  49. package/lib/reuse/modules/mobile/gestures.d.ts +0 -42
  50. package/lib/reuse/modules/mobile/gestures.js +0 -86
  51. package/lib/reuse/modules/mobile/gestures.js.map +0 -1
  52. package/lib/reuse/modules/mobile/ios.d.ts +0 -10
  53. package/lib/reuse/modules/mobile/ios.js +0 -19
  54. package/lib/reuse/modules/mobile/ios.js.map +0 -1
  55. package/lib/reuse/modules/mobile/userInteraction.d.ts +0 -94
  56. package/lib/reuse/modules/mobile/userInteraction.js +0 -210
  57. package/lib/reuse/modules/mobile/userInteraction.js.map +0 -1
  58. package/test/helper/configurations/mobile.conf.js +0 -16
@@ -1,403 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Device = void 0;
7
- // Imports
8
- const verboseLogger_1 = require("../../helper/verboseLogger");
9
- const errorHandler_1 = __importDefault(require("../../helper/errorHandler"));
10
- const ORIENTATION = {
11
- LANDSCAPE: "LANDSCAPE",
12
- PORTRAIT: "PORTRAIT",
13
- UNKNOWN: "UNKNOWN"
14
- };
15
- /**
16
- * @class device
17
- * @memberof mobile
18
- */
19
- class Device {
20
- vlf = new verboseLogger_1.VerboseLoggerFactory("mobile", "device");
21
- ErrorHandler = new errorHandler_1.default();
22
- //==================================Private Methods===============================================
23
- async isValidPlatform() {
24
- const vl = this.vlf.initLog(this.isValidPlatform);
25
- const SUPPORTED_PLATFORMS = ["android", "ios"];
26
- const platform = await browser.capabilities.platformName;
27
- return SUPPORTED_PLATFORMS.includes(platform.toLowerCase().trim());
28
- }
29
- async executionPlatform() {
30
- const vl = this.vlf.initLog(this.executionPlatform);
31
- const platform = browser.capabilities.platformName;
32
- return platform.toLowerCase().trim();
33
- }
34
- //==================================Public Methods================================================
35
- /**
36
- * @function isAppInstalled
37
- * @memberof mobile.device
38
- * @description Check if the application identified by its Package name/Bundle ID is installed on the device.
39
- * @param {string} appPackageOrBundleId - Android package Name, or iOS bundle Id.
40
- * @returns {boolean} - Returns `true` if specified app package/bundled installed in the device, or `false`.
41
- * @example
42
- * await mobile.device.isAppInstalled("com.google.android.apps.maps");
43
- * await mobile.device.isAppInstalled("com.apple.AppStore")
44
- */
45
- async isAppInstalled(appPackageOrBundleId) {
46
- const vl = this.vlf.initLog(this.isAppInstalled);
47
- let isAppInstalledInDevice = false;
48
- try {
49
- if (await this.isValidPlatform()) {
50
- isAppInstalledInDevice = browser.isAppInstalled(appPackageOrBundleId);
51
- vl.log(`${await this.executionPlatform()} app installed successfully.`);
52
- }
53
- else {
54
- vl.log(`Unsupported platform while checking the is app installed or not`);
55
- }
56
- }
57
- catch (error) {
58
- this.ErrorHandler.logException(error, "Error: Could not determine if app is installed, The provided package name is invalid.", true);
59
- }
60
- return isAppInstalledInDevice;
61
- }
62
- /**
63
- * @function installApp
64
- * @memberof mobile.device
65
- * @description Install the appropriate app based on the platform the test is being executed on.
66
- * @param {string} appPath - Path of the app(.apk, .ipa)
67
- * @returns {Promise<void>}
68
- * @example
69
- * await mobile.device.installApp("/path/to/your/app.apk");
70
- * await mobile.device.installApp("/path/to/your/app.ipa");
71
- */
72
- async installApp(appPath) {
73
- const vl = this.vlf.initLog(this.installApp);
74
- try {
75
- vl.log(`Installing ${await this.executionPlatform()} app...`);
76
- if (await this.isValidPlatform()) {
77
- await browser.installApp(appPath);
78
- vl.log(`${await this.executionPlatform()} app installed successfully.`);
79
- }
80
- else {
81
- vl.log(`Unsupported platform ${await this.executionPlatform()} while installing app`);
82
- }
83
- }
84
- catch (error) {
85
- this.ErrorHandler.logException(error, `Error: Unable to install app. The provided app path ${appPath} does not exist`, true);
86
- }
87
- }
88
- /**
89
- * @function switchToContext
90
- * @memberof mobile.device
91
- * @description Switch to the specified( WEBVIEW | NATIVE_APP ) context if available.
92
- * @param {string} [targetContext='WEBVIEW'] The name of the target context.
93
- * @param {number} [timeout=5000] Maximum time to wait for the web context to appear, milliseconds.
94
- * @returns {Promise<boolean>} Returns `true` if the context is successfully switched, otherwise `false`.
95
- * @example
96
- * await mobile.device.switchToContext();
97
- * await mobile.device.switchToContext("NATIVE_APP", 1000);
98
- */
99
- async switchToContext(targetContext = "WEBVIEW", timeout = 5000) {
100
- const vl = this.vlf.initLog(this.switchToContext);
101
- try {
102
- let target = this.getTargetContextIfAvailable(targetContext, timeout);
103
- if (target) {
104
- await browser.switchContext(target);
105
- vl.log(`Switched to ${target} context successfully...`);
106
- return true;
107
- }
108
- else {
109
- vl.log(`Switched to ${target} context not successful, it may be null`);
110
- }
111
- }
112
- catch (error) {
113
- this.ErrorHandler.logException(error, `Error: No contexts available, Could not switch to ${targetContext} context 'INVALID_CONTEXT'. `, true);
114
- }
115
- return false;
116
- }
117
- /**
118
- * @function getTargetContextIfAvailable
119
- * @memberof mobile.device
120
- * @description
121
- * Returns the specified target context if available within a given timeout.
122
- *
123
- * This method retrieves the list of available contexts and determines if a context
124
- * that matches the `targetContext` string is present. If the target context is found,
125
- * it returns the context name; otherwise, it returns `null`.
126
- *
127
- * @param {string} [targetContext='WEBVIEW'] The name of the target context to check for.
128
- * Common examples are `WEBVIEW` or `NATIVE_APP`.
129
- * @param {number} [timeout=5000] The maximum time, in milliseconds, to wait for the target
130
- * context to become available.
131
- * @returns {Promise<string | null>} The name of the target context if found, or `null` if
132
- * the context is not available within the timeout.
133
- * @example
134
- * const context = await getTargetContextIfAvailable("WEBVIEW", 10000);
135
- * const context = await getTargetContextIfAvailable("NATIVE_APP", 10000);
136
- */
137
- async getTargetContextIfAvailable(targetContext = "WEBVIEW", timeout = 5000) {
138
- const vl = this.vlf.initLog(this.getTargetContextIfAvailable);
139
- try {
140
- let availableContexts = [];
141
- const isContextAvailable = await browser.waitUntil(async () => {
142
- // Get all available contexts
143
- availableContexts = await browser.getContexts();
144
- return availableContexts.some((context) => context.includes(targetContext));
145
- }, {
146
- timeout,
147
- timeoutMsg: `Target Context "${targetContext}" not found within ${timeout}ms`
148
- });
149
- if (isContextAvailable) {
150
- const target = availableContexts.find((context) => context.includes(targetContext));
151
- vl.log(`Target Context "${target}" is available.`);
152
- return target || null;
153
- }
154
- else {
155
- vl.log(`Target Context ${targetContext} is not available.`);
156
- }
157
- }
158
- catch (error) {
159
- this.ErrorHandler.logException(error, `Error: No contexts available, Failed to check is target ${targetContext} context available`, true);
160
- }
161
- return null;
162
- }
163
- /**
164
- * @function closeApplication
165
- * @memberof mobile.device
166
- * @description Close the currently active mobile application.
167
- * @returns {Promise<void>}
168
- * @example
169
- * await mobile.device.closeApplication();
170
- */
171
- async closeApplication() {
172
- const vl = this.vlf.initLog(this.closeApplication);
173
- try {
174
- await browser.closeApp();
175
- vl.log("The application has been closed successfully.");
176
- }
177
- catch (error) {
178
- this.ErrorHandler.logException(error, `Error: Unable to close app, the app is not currently running`, true);
179
- }
180
- }
181
- /**
182
- * @function queryAppState
183
- * @memberof mobile.device
184
- * @description Queries the state of the application (e.g., running, background, not installed) on the mobile device(Android or iOS).
185
- * @param {string} appPackageOrBundleId - Package name (Android) or bundle ID (iOS) of the application.
186
- * @returns {Promise<number>} - The app state:
187
- * 0 - Not running,
188
- * 1 - Not installed,
189
- * 2 - Running in the background (not suspended),
190
- * 3 - Running in the background (suspended),
191
- * 4 - Running in the foreground.
192
- * @example
193
- * await mobile.device.queryAppState("com.google.android.apps.maps");
194
- * await mobile.device.queryAppState("com.apple.AppStore");
195
- */
196
- async queryAppState(appPackageOrBundleId) {
197
- const vl = this.vlf.initLog(this.queryAppState);
198
- let appState = -1;
199
- try {
200
- vl.log(`Querying the ${await this.executionPlatform()} app state...`);
201
- if (await this.isValidPlatform()) {
202
- appState = await browser.queryAppState(appPackageOrBundleId);
203
- vl.log(`Application state for ${appPackageOrBundleId} : ${appState}`);
204
- }
205
- else {
206
- vl.log(`Unsupported platform while query app state: ${await this.executionPlatform()}`);
207
- }
208
- }
209
- catch (error) {
210
- this.ErrorHandler.logException(error, `Error: Unable to query app state, the package name ${appPackageOrBundleId} is invalid or does not exist.`, true);
211
- }
212
- return appState;
213
- }
214
- /**
215
- * @function launchApp
216
- * @memberof mobile.device
217
- * @description Launches the app for both iOS and Android with a parameterized app identifier.
218
- * @param {string} appPackageOrBundleId - The Android package name or iOS bundle ID of the application.
219
- * @returns {Promise<void>} Resolves when the app is successfully launched.
220
- * @example
221
- * await mobile.device.launchApp("com.google.android.apps.maps");
222
- * await mobile.device.launchApp("com.apple.AppStore");
223
- */
224
- async launchApp(appPackageOrBundleId) {
225
- const vl = this.vlf.initLog(this.launchApp);
226
- try {
227
- vl.log(`Launching ${await this.executionPlatform()} app...`);
228
- if (await this.isValidPlatform()) {
229
- await browser.activateApp(appPackageOrBundleId);
230
- vl.log(`${await this.executionPlatform()} App launched successfully with given ${appPackageOrBundleId} Package/bundle ID`);
231
- }
232
- else {
233
- vl.log(`Unsupported platform while launching the app: ${await this.executionPlatform()}`);
234
- }
235
- }
236
- catch (error) {
237
- this.ErrorHandler.logException(error, `Error: Unable to launch the app, the package name ${appPackageOrBundleId} is invalid or does not exist.`, true);
238
- }
239
- }
240
- /**
241
- * @function switchToLandscapeOrientation
242
- * @memberof mobile.device
243
- * @description Switches the device orientation to landscape mode.
244
- * @returns {Promise<void>} Resolves when the orientation is successfully switched.
245
- * @example
246
- * await mobile.device.switchToLandscapeOrientation();
247
- */
248
- async switchToLandscapeOrientation() {
249
- const vl = this.vlf.initLog(this.switchToLandscapeOrientation);
250
- try {
251
- const currentOrientation = await browser.getOrientation();
252
- if (currentOrientation === ORIENTATION.LANDSCAPE) {
253
- vl.log("Device is already in landscape mode.");
254
- return;
255
- }
256
- vl.log("Switching device orientation to landscape...");
257
- await browser.setOrientation(ORIENTATION.LANDSCAPE);
258
- vl.log("Device orientation successfully switched to landscape.");
259
- }
260
- catch (error) {
261
- this.ErrorHandler.logException(error, `Error: Could not change device orientation, Invalid argument: The orientation must be 'LANDSCAPE'.`, true);
262
- }
263
- }
264
- /**
265
- * @function switchToPortraitOrientation
266
- * @memberof mobile.device
267
- * @description Switches the device orientation to portrait mode.
268
- * @returns {Promise<void>} Resolves when the orientation is successfully switched.
269
- * @example
270
- * await mobile.device.switchToPortraitOrientation();
271
- */
272
- async switchToPortraitOrientation() {
273
- const vl = this.vlf.initLog(this.switchToPortraitOrientation);
274
- try {
275
- const currentOrientation = await browser.getOrientation();
276
- if (currentOrientation === ORIENTATION.PORTRAIT) {
277
- vl.log("Device is already in portrait mode.");
278
- return;
279
- }
280
- vl.log("Switching device orientation to portrait...");
281
- await browser.setOrientation(ORIENTATION.PORTRAIT);
282
- vl.log("Device orientation successfully switched to portrait.");
283
- }
284
- catch (error) {
285
- this.ErrorHandler.logException(error, `Error: Could not change device orientation, Invalid argument: The orientation must be 'PORTRAIT`, true);
286
- }
287
- }
288
- /**
289
- * @function getCurrentOrientation
290
- * @memberof mobile.device
291
- * @description Returns the device current orientation (PORTRAIT or LANDSCAPE)
292
- * @returns {Promise<Orientation>} The current device orientation.
293
- * @example
294
- * await mobile.device.getCurrentOrientation();
295
- */
296
- async getCurrentOrientation() {
297
- const vl = this.vlf.initLog(this.getCurrentOrientation);
298
- let orientation = ORIENTATION.UNKNOWN; // Default value
299
- try {
300
- orientation = await browser.getOrientation();
301
- vl.log(`Current device orientation: ${orientation}`);
302
- }
303
- catch (error) {
304
- this.ErrorHandler.logException(error, `Error: Could not get the current device orientation`, true);
305
- }
306
- return orientation;
307
- }
308
- /**
309
- * @function hideKeyboard
310
- * @memberof mobile.device
311
- * @description Hides the keyboard on both Android and iOS using specific strategies with timeout.
312
- * @param {string} strategy - Strategy to use for hiding the keyboard ('pressKey', 'tapOutside', 'swipeDown').
313
- * @param {string} key - Key to press if using the 'pressKey' strategy (e.g., 'Done', 'Enter').
314
- * @param {number} keyCode - Key code for Android (optional).
315
- * @param {number} [timeout=5000] - Timeout in milliseconds for retrying to hide the keyboard.
316
- * @returns {Promise<void>}
317
- * @example
318
- * await mobile.device.hideKeyboard();
319
- * await mobile.device.hideKeyboard('tapOutside');
320
- * await mobile.device.hideKeyboard('swipeDown');
321
- * //Android only, Sends a specific key code, like 66 for "Enter."
322
- * await mobile.device.hideKeyboard('pressKey', undefined, 66);
323
- * await mobile.device.hideKeyboard('pressKey', 'Done');
324
- */
325
- async hideKeyboard(strategy, key, keyCode, timeout = 5000) {
326
- const vl = this.vlf.initLog(this.hideKeyboard);
327
- const startTime = Date.now();
328
- while (Date.now() - startTime < timeout) {
329
- try {
330
- if (await util.browser.isAndroid()) {
331
- vl.log("Hiding keyboard on Android.");
332
- await browser.hideKeyboard(strategy, key, keyCode);
333
- }
334
- else if (await util.browser.isIos()) {
335
- vl.log("Hiding keyboard on iOS.");
336
- await browser.execute("mobile: hideKeyboard", { strategy });
337
- }
338
- else {
339
- vl.log("Unsupported platform: Unable to hide the keyboard.");
340
- return;
341
- }
342
- vl.log("Keyboard hidden successfully.");
343
- return; // Exit if the keyboard is successfully hidden
344
- }
345
- catch (error) {
346
- // Wait briefly before retrying
347
- await new Promise((resolve) => setTimeout(resolve, 500));
348
- this.ErrorHandler.logException(error, `Error: Failed to hide the keyboard, Retrying...`, true);
349
- }
350
- }
351
- vl.log(`Failed to hide the keyboard within the timeout of ${timeout}ms.`);
352
- }
353
- /**
354
- * @function isKeyboardVisible
355
- * @memberof mobile.device
356
- * @description Checks if the keyboard is visible or not on the mobile device.
357
- * @returns {Promise<boolean>} Returns `true` if the keyboard is visible on the mobile view.
358
- * @example
359
- * await mobile.device.isKeyboardVisible();
360
- */
361
- async isKeyboardVisible() {
362
- const vl = this.vlf.initLog(this.isKeyboardVisible);
363
- let isKeyboardVisible = false;
364
- try {
365
- if (await util.browser.isAndroid()) {
366
- vl.log("check if the screen height is reduced due to the keyboard");
367
- // For Android, check if the screen height is reduced due to the keyboard
368
- const windowRect = await browser.getWindowRect();
369
- const screenSize = await browser.getWindowSize();
370
- // If the visible height is less, keyboard is visible
371
- vl.log("if visible height is less, keyboard is visible");
372
- isKeyboardVisible = windowRect.height < screenSize.height;
373
- }
374
- else if (await util.browser.isIos()) {
375
- // For iOS, check if the keyboard is displayed via Appium's mobile API
376
- const isKeyboardShown = await browser.execute("mobile: isKeyboardShown");
377
- isKeyboardVisible = isKeyboardShown === true; // Returns true if the keyboard is visible
378
- }
379
- else {
380
- vl.log("Unsupported platform: Unable to detect keyboard visibility.");
381
- return false;
382
- }
383
- }
384
- catch (error) {
385
- this.ErrorHandler.logException(error, `Error: Failed to get the is keyboard visible`, true);
386
- }
387
- return isKeyboardVisible;
388
- }
389
- /**
390
- * @function isPlatformSupported
391
- * @memberof mobile.device
392
- * @description Determine if the current platform is supported, if the current device platform is either `Android` or `iOS`.
393
- * @returns {Promise<boolean>} If neither Android nor iOS is detected (e.g., Windows, Linux, or web), the condition evaluates to false
394
- * @example
395
- * await mobile.device.isPlatformSupported();
396
- */
397
- async isPlatformSupported() {
398
- return (await util.browser.isAndroid()) || (await util.browser.isIos());
399
- }
400
- }
401
- exports.Device = Device;
402
- exports.default = new Device();
403
- //# sourceMappingURL=device.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../src/reuse/modules/mobile/device.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,UAAU;AACV,8DAAkE;AAClE,6EAAqD;AAKrD,MAAM,WAAW,GAAG;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;CACV,CAAC;AAGX;;;GAGG;AACH,MAAa,MAAM;IACT,GAAG,GAAG,IAAI,oCAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACnD,YAAY,GAAG,IAAI,sBAAY,EAAE,CAAC;IAE1C,kGAAkG;IAE1F,KAAK,CAAC,eAAe;QAC3B,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAElD,MAAM,mBAAmB,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAW,MAAM,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC;QACjE,OAAO,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;IACrE,CAAC;IAEO,KAAK,CAAC,iBAAiB;QAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAW,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC;QAC3D,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IACvC,CAAC;IAED,kGAAkG;IAClG;;;;;;;;;OASG;IACH,KAAK,CAAC,cAAc,CAAC,oBAA4B;QAC/C,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC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C,2DAA2D,CAAC,CAAC;gBACpE,yEAAyE;gBACzE,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;gBACjD,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;gBACjD,qDAAqD;gBACrD,EAAE,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;gBACzD,iBAAiB,GAAG,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;YAC5D,CAAC;iBAAM,IAAI,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;gBACtC,sEAAsE;gBACtE,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;gBACzE,iBAAiB,GAAG,eAAe,KAAK,IAAI,CAAC,CAAC,0CAA0C;YAC1F,CAAC;iBAAM,CAAC;gBACN,EAAE,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;gBACtE,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,EAAE,8CAA8C,EAAE,IAAI,CAAC,CAAC;QAC9F,CAAC;QACD,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,mBAAmB;QACvB,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF;AA1YD,wBA0YC;AACD,kBAAe,IAAI,MAAM,EAAE,CAAC"}
@@ -1,95 +0,0 @@
1
- import { Element } from "../../../../@types/wdio";
2
- /**
3
- * @class element
4
- * @memberof mobile
5
- */
6
- export declare class ElementModule {
7
- private vlf;
8
- private ErrorHandler;
9
- /**
10
- * @function isVisible
11
- * @memberof mobile.element
12
- * @description Returns a boolean if the mobile element is visible to the user.
13
- * @param {Element} element - The Mobile Ui element.
14
- * @param {boolean} [strict=true] - If strict mode is enabled it will only return "true" if the element is visible on the mobile view and within the viewport.
15
- * If "false", it will be sufficient if the element is visible on the view but not inside the current viewport.
16
- * @returns {boolean} Returns true or false.
17
- * @example
18
- * await mobile.element.isVisible(elem);
19
- */
20
- isVisible(element: Element, strict?: boolean): Promise<boolean>;
21
- /**
22
- * @function isPresent
23
- * @memberof mobile.element
24
- * @description Returns a boolean if the element is present at the DOM or not. It might be hidden.
25
- * @param {Element} element - The element.
26
- * @returns {boolean} Returns true or false.
27
- * @example
28
- * await mobile.element.isPresent(elem);
29
- */
30
- isPresent(element: Element): Promise<boolean>;
31
- /**
32
- * @function waitToBePresent
33
- * @memberof mobile.element
34
- * @description Waits until the element with the given selector is present.
35
- * @param {Object} selector - The CSS selector describing the element.
36
- * @param {number} [timeout = 30000] - The timeout to wait (ms).
37
- * @returns {boolean} Returns true or false.
38
- * @example
39
- * await mobile.element.waitToBePresent(".input01");
40
- * await mobile.element.waitToBePresent("#button12");
41
- * await mobile.element.waitToBePresent("p:first-child");
42
- */
43
- waitToBePresent(selector: any, timeout?: number): Promise<boolean>;
44
- /**
45
- * @function waitToBeVisible
46
- * @memberof mobile.element
47
- * @description Waits until the element with the given selector is visible.
48
- * @param {Object} selector - The CSS selector describing the element.
49
- * @param {number} [timeout=30000] - The timeout to wait (ms).
50
- * @returns {boolean} Returns true or false.
51
- * @example
52
- * await mobile.element.waitToBeVisible(".input01");
53
- * await mobile.element.waitToBeVisible("#button12");
54
- * await mobile.element.waitToBeVisible("p:first-child");
55
- */
56
- waitToBeVisible(selector: any, timeout?: number): Promise<boolean>;
57
- /**
58
- * @function waitToBeClickable
59
- * @memberof mobile.element
60
- * @description Waits until the element with the given selector is clickable.
61
- * @param {Object} selector - The CSS selector describing the element.
62
- * @param {number} [timeout=30000] - The timeout to wait (ms).
63
- * @returns {boolean} Returns true or false.
64
- * @example
65
- * await mobile.element.waitToBeClickable(".input01");
66
- * await mobile.element.waitToBeClickable("#button12");
67
- * await mobile.element.waitToBeClickable("p:first-child");
68
- */
69
- waitToBeClickable(selector: any, timeout?: number): Promise<boolean>;
70
- /**
71
- * @function isSelected
72
- * @memberof mobile.element
73
- * @description Returns a boolean if the element (e.g. checkbox) is selected.
74
- * @param {Element | string} elementOrSelector - The element.
75
- * @returns {boolean} Returns true or false.
76
- * @example
77
- * const isSelected = await mobile.element.isSelected(elem);
78
- */
79
- isSelected(elementOrSelector: Element | string): Promise<boolean>;
80
- /**
81
- * @function waitToBeEnabled
82
- * @memberof mobile.element
83
- * @description Waits until the element with the given selector is present.
84
- * @param {Object} selector - The CSS selector describing the element.
85
- * @param {number} [timeout=30000] - The timeout to wait (ms).
86
- * @returns {boolean} Returns true or false.
87
- * @example
88
- * await mobile.element.waitToBeEnabled(".input01");
89
- * await mobile.element.waitToBeEnabled("#button12");
90
- * await mobile.element.waitToBeEnabled("p:first-child");
91
- */
92
- waitToBeEnabled(selector: any, timeout?: number): Promise<boolean>;
93
- }
94
- declare const _default: ElementModule;
95
- export default _default;