@sap_oss/wdio-qmate-service 2.13.0 → 2.13.2

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 (66) hide show
  1. package/docs/doc.md +140 -7
  2. package/docs/index.md +1 -1
  3. package/docs/sections/bestPractices/authentication.md +2 -2
  4. package/docs/sections/bestPractices/dataHandling.md +1 -1
  5. package/docs/sections/contact.md +1 -1
  6. package/docs/sections/features/config.md +1 -1
  7. package/docs/sections/features/dataHandling.md +2 -2
  8. package/docs/sections/features/selectors.md +10 -10
  9. package/docs/sections/gettingStarted/config.md +1 -1
  10. package/docs/sections/gettingStarted/setup.md +2 -2
  11. package/docs/sections/support/bugReporting.md +4 -4
  12. package/docs/sections/support/troubleshooting.md +1 -1
  13. package/lib/index.js.map +1 -1
  14. package/lib/reuse/helper/elementResolving.d.ts +1 -0
  15. package/lib/reuse/helper/elementResolving.js +12 -0
  16. package/lib/reuse/helper/elementResolving.js.map +1 -1
  17. package/lib/reuse/index.js +2 -1
  18. package/lib/reuse/index.js.map +1 -1
  19. package/lib/reuse/modules/flp/userLocks.d.ts +3 -3
  20. package/lib/reuse/modules/flp/userLocks.js +5 -5
  21. package/lib/reuse/modules/flp/userLocks.js.map +1 -1
  22. package/lib/reuse/modules/mobile/device.d.ts +160 -4
  23. package/lib/reuse/modules/mobile/device.js +367 -13
  24. package/lib/reuse/modules/mobile/device.js.map +1 -1
  25. package/lib/reuse/modules/mobile/element.d.ts +44 -25
  26. package/lib/reuse/modules/mobile/element.js +80 -26
  27. package/lib/reuse/modules/mobile/element.js.map +1 -1
  28. package/lib/reuse/modules/mobile/userInteraction.d.ts +73 -7
  29. package/lib/reuse/modules/mobile/userInteraction.js +159 -23
  30. package/lib/reuse/modules/mobile/userInteraction.js.map +1 -1
  31. package/lib/reuse/modules/util/Util.d.ts +2 -0
  32. package/lib/reuse/modules/util/Util.js +2 -0
  33. package/lib/reuse/modules/util/Util.js.map +1 -1
  34. package/lib/reuse/modules/util/userSettings.d.ts +27 -0
  35. package/lib/reuse/modules/util/userSettings.js +181 -0
  36. package/lib/reuse/modules/util/userSettings.js.map +1 -0
  37. package/lib/scripts/hooks/onComplete.js.map +1 -1
  38. package/lib/scripts/hooks/onPrepare.js +14 -2
  39. package/lib/scripts/hooks/onPrepare.js.map +1 -1
  40. package/lib/scripts/stats/createUsage.d.ts +1 -0
  41. package/lib/scripts/stats/createUsage.js +0 -1
  42. package/lib/scripts/stats/createUsage.js.map +1 -1
  43. package/lib/scripts/stats/getUserId.js +0 -1
  44. package/lib/scripts/stats/getUserId.js.map +1 -1
  45. package/lib/scripts/stats/stats.d.ts +1 -1
  46. package/lib/scripts/stats/stats.js +4 -3
  47. package/lib/scripts/stats/stats.js.map +1 -1
  48. package/lib/scripts/stats/updateUsage.js +0 -1
  49. package/lib/scripts/stats/updateUsage.js.map +1 -1
  50. package/package.json +1 -1
  51. package/test/reuse/flp/userLocks/data/data.json +3 -3
  52. package/test/reuse/flp/userLocks/deleteExistingLockEntries.spec.js +18 -0
  53. package/test/reuse/flp/userLocks/getNumberOfLockEntries.spec.js +1 -0
  54. package/test/reuse/util/userSettings/data/data.json +6 -0
  55. package/test/reuse/util/userSettings/getDateFormatFromUserSettings.spec.js +21 -0
  56. package/test/reuse/util/userSettings/getLanguageFromUserSettings.spec.js +15 -0
  57. package/test/reuse/util/userSettings/getTimeFormatFromUserSettings.spec.js +17 -0
  58. package/test/reuse/util/userSettings/getTimeZoneFromUserSettings.spec.js +16 -0
  59. package/test/reuse/util/userSettings/setDateFormatFromUserSettings.spec.js +33 -0
  60. package/test/reuse/util/userSettings/setLanguageFromUserSettings.spec.js +16 -0
  61. package/test/reuse/util/userSettings/setNumberFormatFromUserSettings.spec.js +16 -0
  62. package/test/reuse/util/userSettings/setS4UserSettings.spec.js +37 -0
  63. package/test/reuse/util/userSettings/setTimeFormatFromUserSettings.spec.js +17 -0
  64. package/test/reuse/util/userSettings/setTimeZoneFromUserSettings.spec.js +16 -0
  65. package/test/reuse/util/userSettings/test.userSettings.apply.conf.js +16 -0
  66. package/test/reuse/util/userSettings/test.userSettings.conf.js +24 -0
@@ -1,3 +1,10 @@
1
+ type hideKeyboardStrategy = "pressKey" | "tapOutside" | "swipeDown" | "";
2
+ declare const ORIENTATION: {
3
+ readonly LANDSCAPE: "LANDSCAPE";
4
+ readonly PORTRAIT: "PORTRAIT";
5
+ readonly UNKNOWN: "UNKNOWN";
6
+ };
7
+ type Orientation = (typeof ORIENTATION)[keyof typeof ORIENTATION];
1
8
  /**
2
9
  * @class device
3
10
  * @memberof mobile
@@ -5,25 +12,174 @@
5
12
  export declare class Device {
6
13
  private vlf;
7
14
  private ErrorHandler;
15
+ /**
16
+ * @function isValidPlatform
17
+ * @memberof mobile.device
18
+ * @description Check the mobile platform from the session's capabilities.
19
+ * @returns {boolean} Returns 'true' if the platform in the session's capabilities is either Android or iOS.
20
+ */
21
+ private isValidPlatform;
22
+ /**
23
+ * @function executionPlatform
24
+ * @memberof mobile.device
25
+ * @description Check the mobile platform from the session's capabilities.
26
+ * @returns {string} Return current execution platform in the session's capabilities.
27
+ */
28
+ private executionPlatform;
8
29
  /**
9
30
  * @function isAppInstalled
10
31
  * @memberof mobile.device
11
32
  * @description Check wether given package/bundle app is installed or not in the device.
12
- * @param {string} packageIdOrBundleId - Android package Id, or iOS bundle Id.
13
- * @returns {boolean} Returns true if specified app package/bundled installed in the device, or false.
14
- * @example await mobile.device.isAppInstalled("com.google.android.apps.maps");
33
+ * @param {string} appPackageOrBundleId - Android package Id, or iOS bundle Id.
34
+ * @returns {boolean} Returns 'true' if specified app package/bundled installed in the device, or 'false'.
35
+ * @example
36
+ * await mobile.device.isAppInstalled("com.google.android.apps.maps");
37
+ * await mobile.device.isAppInstalled("com.apple.AppStore")
15
38
  */
16
- isAppInstalled(packageIdOrBundleId: string): Promise<boolean>;
39
+ isAppInstalled(appPackageOrBundleId: string): Promise<boolean>;
17
40
  /**
18
41
  * @function installApp
19
42
  * @memberof mobile.device
20
43
  * @description Install the appropriate app based on the platform the test is being executed on.
21
44
  * @param {string} appPath - Path of the app(.apk, .ipa)
45
+ * @returns {Promise<void>}
22
46
  * @example
23
47
  * await mobile.device.installApp("/path/to/your/app.apk");
24
48
  * await mobile.device.installApp("/path/to/your/app.ipa");
25
49
  */
26
50
  installApp(appPath: string): Promise<void>;
51
+ /**
52
+ * @function switchToContext
53
+ * @memberof mobile.device
54
+ * @description Switch to the specified( WEBVIEW | NATIVE_APP ) context if available.
55
+ * @param {string} [targetContext='WEBVIEW'] The name of the target context.
56
+ * @param {number} [timeout=5000] Maximum time to wait for the web context to appear, milliseconds.
57
+ * @returns {Promise<boolean>} Returns 'true' if the context is successfully switched, otherwise 'false'.
58
+ * @example
59
+ * await mobile.device.switchToContext();
60
+ * await mobile.device.switchToContext("NATIVE_APP", 1000);
61
+ */
62
+ switchToContext(targetContext?: string, timeout?: number): Promise<boolean>;
63
+ /**
64
+ * @function getTargetContextIfAvailable
65
+ * @memberof mobile.device
66
+ * @description
67
+ * Returns the specified target context if available within a given timeout.
68
+ *
69
+ * This method retrieves the list of available contexts and determines if a context
70
+ * that matches the `targetContext` string is present. If the target context is found,
71
+ * it returns the context name; otherwise, it returns `null`.
72
+ *
73
+ * @param {string} [targetContext="WEBVIEW"] - The name of the target context to check for.
74
+ * Common examples are "WEBVIEW" or "NATIVE_APP".
75
+ * @param {number} [timeout=5000] - The maximum time, in milliseconds, to wait for the target
76
+ * context to become available.
77
+ * @returns {Promise<string | null>} - The name of the target context if found, or `null` if
78
+ * the context is not available within the timeout.
79
+ * @example
80
+ * const context = await getTargetContextIfAvailable("WEBVIEW", 10000);
81
+ * const context = await getTargetContextIfAvailable("NATIVE_APP", 10000);
82
+ */
83
+ getTargetContextIfAvailable(targetContext?: string, timeout?: number): Promise<string | null>;
84
+ /**
85
+ * @function closeApplication
86
+ * @memberof mobile.device
87
+ * @description Close the currently active mobile application.
88
+ * @returns {Promise<void>}
89
+ * @example
90
+ * await mobile.device.closeApplication();
91
+ */
92
+ closeApplication(): Promise<void>;
93
+ /**
94
+ * @function queryAppState
95
+ * @memberof mobile.device
96
+ * @description Queries the state of the application (e.g., running, background, not installed) on the mobile device(Android or iOS).
97
+ * @param {string} appPackageOrBundleId - Package name (Android) or bundle ID (iOS) of the application.
98
+ * @returns {Promise<number>} - The app state:
99
+ * 0 - Not running,
100
+ * 1 - Not installed,
101
+ * 2 - Running in the background (not suspended),
102
+ * 3 - Running in the background (suspended),
103
+ * 4 - Running in the foreground.
104
+ * @example
105
+ * await mobile.device.queryAppState("com.google.android.apps.maps");
106
+ * await mobile.device.queryAppState("com.apple.AppStore");
107
+ */
108
+ queryAppState(appPackageOrBundleId: string): Promise<number>;
109
+ /**
110
+ * @function launchApp
111
+ * @memberof mobile.device
112
+ * @description Launches the app for both iOS and Android with a parameterized app identifier.
113
+ * @param {string} appPackageOrBundleId - The Android package name or iOS bundle ID of the application.
114
+ * @returns {Promise<void>} Resolves when the app is successfully launched.
115
+ * @example
116
+ * await mobile.device.launchApp("com.google.android.apps.maps");
117
+ * await mobile.device.launchApp("com.apple.AppStore");
118
+ */
119
+ launchApp(appPackageOrBundleId: string): Promise<void>;
120
+ /**
121
+ * @function switchToLandscapeOrientation
122
+ * @memberof mobile.device
123
+ * @description Switches the device orientation to landscape mode.
124
+ * @returns {Promise<void>} Resolves when the orientation is successfully switched.
125
+ * @example
126
+ * await mobile.device.switchToLandscapeOrientation();
127
+ */
128
+ switchToLandscapeOrientation(): Promise<void>;
129
+ /**
130
+ * @function switchToPortraitOrientation
131
+ * @memberof mobile.device
132
+ * @description Switches the device orientation to portrait mode.
133
+ * @returns {Promise<void>} Resolves when the orientation is successfully switched.
134
+ * @example
135
+ * await mobile.device.switchToPortraitOrientation();
136
+ */
137
+ switchToPortraitOrientation(): Promise<void>;
138
+ /**
139
+ * @function getCurrentOrientation
140
+ * @memberof mobile.device
141
+ * @description Returns the device current orientation (PORTRAIT or LANDSCAPE)
142
+ * @returns {Promise<Orientation>} The current device orientation.
143
+ * @example
144
+ * await mobile.device.getCurrentOrientation();
145
+ */
146
+ getCurrentOrientation(): Promise<Orientation>;
147
+ /**
148
+ * @function hideKeyboard
149
+ * @memberof mobile.device
150
+ * @description Hides the keyboard on both Android and iOS using specific strategies with timeout.
151
+ * @param {string} strategy - Strategy to use for hiding the keyboard ('pressKey', 'tapOutside', 'swipeDown').
152
+ * @param {string} key - Key to press if using the 'pressKey' strategy (e.g., 'Done', 'Enter').
153
+ * @param {number} keyCode - Key code for Android (optional).
154
+ * @param {number} [timeout=5000] - Timeout in milliseconds for retrying to hide the keyboard.
155
+ * @returns {Promise<void>}
156
+ * @example
157
+ * await mobile.device.hideKeyboard();
158
+ * await mobile.device.hideKeyboard('tapOutside');
159
+ * await mobile.device.hideKeyboard('swipeDown');
160
+ * //Android only, Sends a specific key code, like 66 for "Enter."
161
+ * await mobile.device.hideKeyboard('pressKey', undefined, 66);
162
+ * await mobile.device.hideKeyboard('pressKey', 'Done');
163
+ */
164
+ hideKeyboard(strategy?: hideKeyboardStrategy, key?: string, keyCode?: number, timeout?: number): Promise<void>;
165
+ /**
166
+ * @function isKeyboardVisible
167
+ * @memberof mobile.device
168
+ * @description Checks if the keyboard is visible or not on the mobile device.
169
+ * @returns {Promise<boolean>} Returns 'true' if the keyboard is visible on the mobile view.
170
+ * @example
171
+ * await mobile.device.isKeyboardVisible();
172
+ */
173
+ isKeyboardVisible(): Promise<boolean>;
174
+ /**
175
+ * @function isPlatformSupported
176
+ * @memberof mobile.device
177
+ * @description Determine if the current platform is supported, if the current device platform is either Android or iOS.
178
+ * @returns {Promise<boolean>} If neither Android nor iOS is detected (e.g., Windows, Linux, or web), the condition evaluates to false
179
+ * @example
180
+ * await mobile.device.isPlatformSupported();
181
+ */
182
+ isPlatformSupported(): Promise<boolean>;
27
183
  }
28
184
  declare const _default: Device;
29
185
  export default _default;
@@ -4,8 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Device = void 0;
7
+ // Imports
7
8
  const verboseLogger_1 = require("../../helper/verboseLogger");
8
9
  const errorHandler_1 = __importDefault(require("../../helper/errorHandler"));
10
+ const ORIENTATION = {
11
+ LANDSCAPE: "LANDSCAPE",
12
+ PORTRAIT: "PORTRAIT",
13
+ UNKNOWN: "UNKNOWN"
14
+ };
9
15
  /**
10
16
  * @class device
11
17
  * @memberof mobile
@@ -15,47 +21,395 @@ class Device {
15
21
  this.vlf = new verboseLogger_1.VerboseLoggerFactory("mobile", "device");
16
22
  this.ErrorHandler = new errorHandler_1.default();
17
23
  }
24
+ //==================================Private Methods===============================================
25
+ /**
26
+ * @function isValidPlatform
27
+ * @memberof mobile.device
28
+ * @description Check the mobile platform from the session's capabilities.
29
+ * @returns {boolean} Returns 'true' if the platform in the session's capabilities is either Android or iOS.
30
+ */
31
+ async isValidPlatform() {
32
+ const vl = this.vlf.initLog(this.isValidPlatform);
33
+ const SUPPORTED_PLATFORMS = ["android", "ios"];
34
+ const platform = await browser.capabilities.platformName;
35
+ return SUPPORTED_PLATFORMS.includes(platform.toLowerCase().trim());
36
+ }
37
+ /**
38
+ * @function executionPlatform
39
+ * @memberof mobile.device
40
+ * @description Check the mobile platform from the session's capabilities.
41
+ * @returns {string} Return current execution platform in the session's capabilities.
42
+ */
43
+ async executionPlatform() {
44
+ const vl = this.vlf.initLog(this.executionPlatform);
45
+ const platform = browser.capabilities.platformName;
46
+ return platform.toLowerCase().trim();
47
+ }
48
+ //==================================Public Methods================================================
18
49
  /**
19
50
  * @function isAppInstalled
20
51
  * @memberof mobile.device
21
52
  * @description Check wether given package/bundle app is installed or not in the device.
22
- * @param {string} packageIdOrBundleId - Android package Id, or iOS bundle Id.
23
- * @returns {boolean} Returns true if specified app package/bundled installed in the device, or false.
24
- * @example await mobile.device.isAppInstalled("com.google.android.apps.maps");
53
+ * @param {string} appPackageOrBundleId - Android package Id, or iOS bundle Id.
54
+ * @returns {boolean} Returns 'true' if specified app package/bundled installed in the device, or 'false'.
55
+ * @example
56
+ * await mobile.device.isAppInstalled("com.google.android.apps.maps");
57
+ * await mobile.device.isAppInstalled("com.apple.AppStore")
25
58
  */
26
- async isAppInstalled(packageIdOrBundleId) {
59
+ async isAppInstalled(appPackageOrBundleId) {
27
60
  const vl = this.vlf.initLog(this.isAppInstalled);
61
+ let isAppInstalledInDevice = false;
28
62
  try {
29
- const isAppInstalledInDevice = browser.isAppInstalled(packageIdOrBundleId);
30
- vl.log(`Given app package/bundle id ${packageIdOrBundleId} installed on the device is ${isAppInstalledInDevice.toString()}`);
31
- return isAppInstalledInDevice;
63
+ if (await this.isValidPlatform()) {
64
+ isAppInstalledInDevice = browser.isAppInstalled(appPackageOrBundleId);
65
+ vl.log(`${await this.executionPlatform()} app installed successfully.`);
66
+ }
67
+ else {
68
+ vl.log(`Unsupported platform while checking the is app installed or not`);
69
+ }
32
70
  }
33
71
  catch (error) {
34
- return this.ErrorHandler.logException(error, "Error: During isAppInstalled", true);
72
+ this.ErrorHandler.logException(error, "Error: Could not determine if app is installed, The provided package name is invalid.", true);
35
73
  }
74
+ return isAppInstalledInDevice;
36
75
  }
37
76
  /**
38
77
  * @function installApp
39
78
  * @memberof mobile.device
40
79
  * @description Install the appropriate app based on the platform the test is being executed on.
41
80
  * @param {string} appPath - Path of the app(.apk, .ipa)
81
+ * @returns {Promise<void>}
42
82
  * @example
43
83
  * await mobile.device.installApp("/path/to/your/app.apk");
44
84
  * await mobile.device.installApp("/path/to/your/app.ipa");
45
85
  */
46
86
  async installApp(appPath) {
47
87
  const vl = this.vlf.initLog(this.installApp);
48
- const platform = await browser.capabilities.platformName;
49
88
  try {
50
- vl.log(`Installing ${platform.toLowerCase()} app...`);
51
- if (["android", "ios"].includes(platform.toLowerCase().trim())) {
89
+ vl.log(`Installing ${await this.executionPlatform()} app...`);
90
+ if (await this.isValidPlatform()) {
52
91
  await browser.installApp(appPath);
53
- vl.log(`${platform.toLowerCase()} app installed successfully.`);
92
+ vl.log(`${await this.executionPlatform()} app installed successfully.`);
93
+ }
94
+ else {
95
+ vl.log(`Unsupported platform ${await this.executionPlatform()} while installing app`);
96
+ }
97
+ }
98
+ catch (error) {
99
+ this.ErrorHandler.logException(error, `Error: Unable to install app. The provided app path ${appPath} does not exist`, true);
100
+ }
101
+ }
102
+ /**
103
+ * @function switchToContext
104
+ * @memberof mobile.device
105
+ * @description Switch to the specified( WEBVIEW | NATIVE_APP ) context if available.
106
+ * @param {string} [targetContext='WEBVIEW'] The name of the target context.
107
+ * @param {number} [timeout=5000] Maximum time to wait for the web context to appear, milliseconds.
108
+ * @returns {Promise<boolean>} Returns 'true' if the context is successfully switched, otherwise 'false'.
109
+ * @example
110
+ * await mobile.device.switchToContext();
111
+ * await mobile.device.switchToContext("NATIVE_APP", 1000);
112
+ */
113
+ async switchToContext(targetContext = "WEBVIEW", timeout = 5000) {
114
+ const vl = this.vlf.initLog(this.switchToContext);
115
+ try {
116
+ let target = this.getTargetContextIfAvailable(targetContext, timeout);
117
+ if (target) {
118
+ await browser.switchContext(target);
119
+ vl.log(`Switched to ${target} context successfully...`);
120
+ return true;
121
+ }
122
+ else {
123
+ vl.log(`Switched to ${target} context not successful, it may be null`);
124
+ }
125
+ }
126
+ catch (error) {
127
+ this.ErrorHandler.logException(error, `Error: No contexts available, Could not switch to ${targetContext} context 'INVALID_CONTEXT'. `, true);
128
+ }
129
+ return false;
130
+ }
131
+ /**
132
+ * @function getTargetContextIfAvailable
133
+ * @memberof mobile.device
134
+ * @description
135
+ * Returns the specified target context if available within a given timeout.
136
+ *
137
+ * This method retrieves the list of available contexts and determines if a context
138
+ * that matches the `targetContext` string is present. If the target context is found,
139
+ * it returns the context name; otherwise, it returns `null`.
140
+ *
141
+ * @param {string} [targetContext="WEBVIEW"] - The name of the target context to check for.
142
+ * Common examples are "WEBVIEW" or "NATIVE_APP".
143
+ * @param {number} [timeout=5000] - The maximum time, in milliseconds, to wait for the target
144
+ * context to become available.
145
+ * @returns {Promise<string | null>} - The name of the target context if found, or `null` if
146
+ * the context is not available within the timeout.
147
+ * @example
148
+ * const context = await getTargetContextIfAvailable("WEBVIEW", 10000);
149
+ * const context = await getTargetContextIfAvailable("NATIVE_APP", 10000);
150
+ */
151
+ async getTargetContextIfAvailable(targetContext = "WEBVIEW", timeout = 5000) {
152
+ const vl = this.vlf.initLog(this.getTargetContextIfAvailable);
153
+ try {
154
+ let availableContexts = [];
155
+ const isContextAvailable = await browser.waitUntil(async () => {
156
+ // Get all available contexts
157
+ availableContexts = await browser.getContexts();
158
+ return availableContexts.some((context) => context.includes(targetContext));
159
+ }, {
160
+ timeout,
161
+ timeoutMsg: `Target Context "${targetContext}" not found within ${timeout}ms`
162
+ });
163
+ if (isContextAvailable) {
164
+ const target = availableContexts.find((context) => context.includes(targetContext));
165
+ vl.log(`Target Context "${target}" is available.`);
166
+ return target || null;
167
+ }
168
+ else {
169
+ vl.log(`Target Context ${targetContext} is not available.`);
170
+ }
171
+ }
172
+ catch (error) {
173
+ this.ErrorHandler.logException(error, `Error: No contexts available, Failed to check is target ${targetContext} context available`, true);
174
+ }
175
+ return null;
176
+ }
177
+ /**
178
+ * @function closeApplication
179
+ * @memberof mobile.device
180
+ * @description Close the currently active mobile application.
181
+ * @returns {Promise<void>}
182
+ * @example
183
+ * await mobile.device.closeApplication();
184
+ */
185
+ async closeApplication() {
186
+ const vl = this.vlf.initLog(this.closeApplication);
187
+ try {
188
+ await browser.closeApp();
189
+ vl.log("The application has been closed successfully.");
190
+ }
191
+ catch (error) {
192
+ this.ErrorHandler.logException(error, `Error: Unable to close app, the app is not currently running`, true);
193
+ }
194
+ }
195
+ /**
196
+ * @function queryAppState
197
+ * @memberof mobile.device
198
+ * @description Queries the state of the application (e.g., running, background, not installed) on the mobile device(Android or iOS).
199
+ * @param {string} appPackageOrBundleId - Package name (Android) or bundle ID (iOS) of the application.
200
+ * @returns {Promise<number>} - The app state:
201
+ * 0 - Not running,
202
+ * 1 - Not installed,
203
+ * 2 - Running in the background (not suspended),
204
+ * 3 - Running in the background (suspended),
205
+ * 4 - Running in the foreground.
206
+ * @example
207
+ * await mobile.device.queryAppState("com.google.android.apps.maps");
208
+ * await mobile.device.queryAppState("com.apple.AppStore");
209
+ */
210
+ async queryAppState(appPackageOrBundleId) {
211
+ const vl = this.vlf.initLog(this.queryAppState);
212
+ let appState = -1;
213
+ try {
214
+ vl.log(`Querying the ${await this.executionPlatform()} app state...`);
215
+ if (await this.isValidPlatform()) {
216
+ appState = await browser.queryAppState(appPackageOrBundleId);
217
+ vl.log(`Application state for ${appPackageOrBundleId} : ${appState}`);
218
+ }
219
+ else {
220
+ vl.log(`Unsupported platform while query app state: ${await this.executionPlatform()}`);
221
+ }
222
+ }
223
+ catch (error) {
224
+ this.ErrorHandler.logException(error, `Error: Unable to query app state, the package name ${appPackageOrBundleId} is invalid or does not exist.`, true);
225
+ }
226
+ return appState;
227
+ }
228
+ /**
229
+ * @function launchApp
230
+ * @memberof mobile.device
231
+ * @description Launches the app for both iOS and Android with a parameterized app identifier.
232
+ * @param {string} appPackageOrBundleId - The Android package name or iOS bundle ID of the application.
233
+ * @returns {Promise<void>} Resolves when the app is successfully launched.
234
+ * @example
235
+ * await mobile.device.launchApp("com.google.android.apps.maps");
236
+ * await mobile.device.launchApp("com.apple.AppStore");
237
+ */
238
+ async launchApp(appPackageOrBundleId) {
239
+ const vl = this.vlf.initLog(this.launchApp);
240
+ try {
241
+ vl.log(`Launching ${await this.executionPlatform()} app...`);
242
+ if (await this.isValidPlatform()) {
243
+ await browser.activateApp(appPackageOrBundleId);
244
+ vl.log(`${await this.executionPlatform()} App launched successfully with given ${appPackageOrBundleId} Package/bundle ID`);
245
+ }
246
+ else {
247
+ vl.log(`Unsupported platform while launching the app: ${await this.executionPlatform()}`);
54
248
  }
55
249
  }
56
250
  catch (error) {
57
- this.ErrorHandler.logException(error, `Error: Unsupported platform while installing the app: ${platform.toLowerCase().trim()}`, true);
251
+ this.ErrorHandler.logException(error, `Error: Unable to launch the app, the package name ${appPackageOrBundleId} is invalid or does not exist.`, true);
252
+ }
253
+ }
254
+ /**
255
+ * @function switchToLandscapeOrientation
256
+ * @memberof mobile.device
257
+ * @description Switches the device orientation to landscape mode.
258
+ * @returns {Promise<void>} Resolves when the orientation is successfully switched.
259
+ * @example
260
+ * await mobile.device.switchToLandscapeOrientation();
261
+ */
262
+ async switchToLandscapeOrientation() {
263
+ const vl = this.vlf.initLog(this.switchToLandscapeOrientation);
264
+ try {
265
+ const currentOrientation = await browser.getOrientation();
266
+ if (currentOrientation === ORIENTATION.LANDSCAPE) {
267
+ vl.log("Device is already in landscape mode.");
268
+ return;
269
+ }
270
+ vl.log("Switching device orientation to landscape...");
271
+ await browser.setOrientation(ORIENTATION.LANDSCAPE);
272
+ vl.log("Device orientation successfully switched to landscape.");
58
273
  }
274
+ catch (error) {
275
+ this.ErrorHandler.logException(error, `Error: Could not change device orientation, Invalid argument: The orientation must be 'LANDSCAPE'.`, true);
276
+ }
277
+ }
278
+ /**
279
+ * @function switchToPortraitOrientation
280
+ * @memberof mobile.device
281
+ * @description Switches the device orientation to portrait mode.
282
+ * @returns {Promise<void>} Resolves when the orientation is successfully switched.
283
+ * @example
284
+ * await mobile.device.switchToPortraitOrientation();
285
+ */
286
+ async switchToPortraitOrientation() {
287
+ const vl = this.vlf.initLog(this.switchToPortraitOrientation);
288
+ try {
289
+ const currentOrientation = await browser.getOrientation();
290
+ if (currentOrientation === ORIENTATION.PORTRAIT) {
291
+ vl.log("Device is already in portrait mode.");
292
+ return;
293
+ }
294
+ vl.log("Switching device orientation to portrait...");
295
+ await browser.setOrientation(ORIENTATION.PORTRAIT);
296
+ vl.log("Device orientation successfully switched to portrait.");
297
+ }
298
+ catch (error) {
299
+ this.ErrorHandler.logException(error, `Error: Could not change device orientation, Invalid argument: The orientation must be 'PORTRAIT`, true);
300
+ }
301
+ }
302
+ /**
303
+ * @function getCurrentOrientation
304
+ * @memberof mobile.device
305
+ * @description Returns the device current orientation (PORTRAIT or LANDSCAPE)
306
+ * @returns {Promise<Orientation>} The current device orientation.
307
+ * @example
308
+ * await mobile.device.getCurrentOrientation();
309
+ */
310
+ async getCurrentOrientation() {
311
+ const vl = this.vlf.initLog(this.getCurrentOrientation);
312
+ let orientation = ORIENTATION.UNKNOWN; // Default value
313
+ try {
314
+ orientation = await browser.getOrientation();
315
+ vl.log(`Current device orientation: ${orientation}`);
316
+ }
317
+ catch (error) {
318
+ this.ErrorHandler.logException(error, `Error: Could not get the current device orientation`, true);
319
+ }
320
+ return orientation;
321
+ }
322
+ /**
323
+ * @function hideKeyboard
324
+ * @memberof mobile.device
325
+ * @description Hides the keyboard on both Android and iOS using specific strategies with timeout.
326
+ * @param {string} strategy - Strategy to use for hiding the keyboard ('pressKey', 'tapOutside', 'swipeDown').
327
+ * @param {string} key - Key to press if using the 'pressKey' strategy (e.g., 'Done', 'Enter').
328
+ * @param {number} keyCode - Key code for Android (optional).
329
+ * @param {number} [timeout=5000] - Timeout in milliseconds for retrying to hide the keyboard.
330
+ * @returns {Promise<void>}
331
+ * @example
332
+ * await mobile.device.hideKeyboard();
333
+ * await mobile.device.hideKeyboard('tapOutside');
334
+ * await mobile.device.hideKeyboard('swipeDown');
335
+ * //Android only, Sends a specific key code, like 66 for "Enter."
336
+ * await mobile.device.hideKeyboard('pressKey', undefined, 66);
337
+ * await mobile.device.hideKeyboard('pressKey', 'Done');
338
+ */
339
+ async hideKeyboard(strategy, key, keyCode, timeout = 5000) {
340
+ const vl = this.vlf.initLog(this.hideKeyboard);
341
+ const startTime = Date.now();
342
+ while (Date.now() - startTime < timeout) {
343
+ try {
344
+ if (await util.browser.isAndroid()) {
345
+ vl.log("Hiding keyboard on Android.");
346
+ await browser.hideKeyboard(strategy, key, keyCode);
347
+ }
348
+ else if (await util.browser.isIos()) {
349
+ vl.log("Hiding keyboard on iOS.");
350
+ await browser.execute("mobile: hideKeyboard", { strategy });
351
+ }
352
+ else {
353
+ vl.log("Unsupported platform: Unable to hide the keyboard.");
354
+ return;
355
+ }
356
+ vl.log("Keyboard hidden successfully.");
357
+ return; // Exit if the keyboard is successfully hidden
358
+ }
359
+ catch (error) {
360
+ // Wait briefly before retrying
361
+ await new Promise((resolve) => setTimeout(resolve, 500));
362
+ this.ErrorHandler.logException(error, `Error: Failed to hide the keyboard, Retrying...`, true);
363
+ }
364
+ }
365
+ vl.log(`Failed to hide the keyboard within the timeout of ${timeout}ms.`);
366
+ }
367
+ /**
368
+ * @function isKeyboardVisible
369
+ * @memberof mobile.device
370
+ * @description Checks if the keyboard is visible or not on the mobile device.
371
+ * @returns {Promise<boolean>} Returns 'true' if the keyboard is visible on the mobile view.
372
+ * @example
373
+ * await mobile.device.isKeyboardVisible();
374
+ */
375
+ async isKeyboardVisible() {
376
+ const vl = this.vlf.initLog(this.isKeyboardVisible);
377
+ let isKeyboardVisible = false;
378
+ try {
379
+ if (await util.browser.isAndroid()) {
380
+ vl.log("check if the screen height is reduced due to the keyboard");
381
+ // For Android, check if the screen height is reduced due to the keyboard
382
+ const windowRect = await browser.getWindowRect();
383
+ const screenSize = await browser.getWindowSize();
384
+ // If the visible height is less, keyboard is visible
385
+ vl.log("if visible height is less, keyboard is visible");
386
+ isKeyboardVisible = windowRect.height < screenSize.height;
387
+ }
388
+ else if (await util.browser.isIos()) {
389
+ // For iOS, check if the keyboard is displayed via Appium's mobile API
390
+ const isKeyboardShown = await browser.execute("mobile: isKeyboardShown");
391
+ isKeyboardVisible = isKeyboardShown === true; // Returns true if the keyboard is visible
392
+ }
393
+ else {
394
+ vl.log("Unsupported platform: Unable to detect keyboard visibility.");
395
+ return false;
396
+ }
397
+ }
398
+ catch (error) {
399
+ this.ErrorHandler.logException(error, `Error: Failed to get the is keyboard visible`, true);
400
+ }
401
+ return isKeyboardVisible;
402
+ }
403
+ /**
404
+ * @function isPlatformSupported
405
+ * @memberof mobile.device
406
+ * @description Determine if the current platform is supported, if the current device platform is either Android or iOS.
407
+ * @returns {Promise<boolean>} If neither Android nor iOS is detected (e.g., Windows, Linux, or web), the condition evaluates to false
408
+ * @example
409
+ * await mobile.device.isPlatformSupported();
410
+ */
411
+ async isPlatformSupported() {
412
+ return (await util.browser.isAndroid()) || (await util.browser.isIos());
59
413
  }
60
414
  }
61
415
  exports.Device = Device;
@@ -1 +1 @@
1
- {"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../src/reuse/modules/mobile/device.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,8DAAkE;AAClE,6EAAqD;AAErD;;;GAGG;AACH,MAAa,MAAM;IAAnB;QACU,QAAG,GAAG,IAAI,oCAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnD,iBAAY,GAAG,IAAI,sBAAY,EAAE,CAAC;IA2C5C,CAAC;IAzCC;;;;;;;OAOG;IACH,KAAK,CAAC,cAAc,CAAC,mBAA2B;QAC9C,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACjD,IAAI,CAAC;YACH,MAAM,sBAAsB,GAAY,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;YACpF,EAAE,CAAC,GAAG,CAAC,+BAA+B,mBAAmB,+BAA+B,sBAAsB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAC7H,OAAO,sBAAsB,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,EAAE,8BAA8B,EAAE,IAAI,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,UAAU,CAAC,OAAe;QAC9B,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAW,MAAM,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC;QACjE,IAA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