ff-automationv2 2.2.2 → 2.2.6
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.
- package/dist/ai/llmprompts/systemPrompts/combinedActionExtractorPromptMob.js +3 -2
- package/dist/ai/llmprompts/systemPrompts/fireflinkElementIndexExtractor_Mob.js +8 -2
- package/dist/ai/llmprompts/systemPrompts/getActionExtractorPromptMob.js +2 -2
- package/dist/ai/llmprompts/systemPrompts/mobileKeywordExtractor.js +6 -6
- package/dist/ai/llmprompts/systemPrompts/verifyActionExtractorPromptMob.js +2 -2
- package/dist/ai/llmprompts/systemPrompts/visionPromptMobile.js +1 -1
- package/dist/ai/llmprompts/systemPrompts/waitActionExtractorPromptMob.js +2 -2
- package/dist/automation/actions/executor.d.ts +29 -0
- package/dist/automation/actions/executor.js +419 -0
- package/dist/automation/actions/interaction/click/doubleClick.js +2 -2
- package/dist/automation/actions/interaction/click/tapOnSpecifiedLocation.d.ts +2 -0
- package/dist/automation/actions/interaction/click/tapOnSpecifiedLocation.js +29 -0
- package/dist/automation/actions/interaction/elementlessActions/activateAppUsingAppPackage.d.ts +5 -0
- package/dist/automation/actions/interaction/elementlessActions/activateAppUsingAppPackage.js +17 -0
- package/dist/automation/actions/interaction/elementlessActions/installAPK.d.ts +2 -0
- package/dist/automation/actions/interaction/elementlessActions/installAPK.js +40 -0
- package/dist/automation/actions/interaction/elementlessActions/isAppInstalled.d.ts +2 -0
- package/dist/automation/actions/interaction/elementlessActions/isAppInstalled.js +35 -0
- package/dist/automation/actions/interaction/elementlessActions/openAppWithApkFilePath.d.ts +2 -0
- package/dist/automation/actions/interaction/elementlessActions/openAppWithApkFilePath.js +93 -0
- package/dist/automation/actions/interaction/elementlessActions/openMobileApplication.d.ts +2 -0
- package/dist/automation/actions/interaction/elementlessActions/openMobileApplication.js +14 -0
- package/dist/automation/actions/interaction/elementlessActions/receiveMessageOnEmulator.d.ts +2 -0
- package/dist/automation/actions/interaction/elementlessActions/receiveMessageOnEmulator.js +17 -0
- package/dist/automation/actions/interaction/elementlessActions/terminateAppUsingAppPackage.d.ts +2 -0
- package/dist/automation/actions/interaction/elementlessActions/terminateAppUsingAppPackage.js +17 -0
- package/dist/automation/actions/interaction/elementlessActions/uninstallAPK.d.ts +2 -0
- package/dist/automation/actions/interaction/elementlessActions/uninstallAPK.js +44 -0
- package/dist/automation/actions/interaction/inputlessActions/AirplaneModeSwitchOff.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/AirplaneModeSwitchOff.js +24 -0
- package/dist/automation/actions/interaction/inputlessActions/AirplaneModeSwitchOn.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/AirplaneModeSwitchOn.js +25 -0
- package/dist/automation/actions/interaction/inputlessActions/Break.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/Break.js +14 -0
- package/dist/automation/actions/interaction/inputlessActions/Continue.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/Continue.js +14 -0
- package/dist/automation/actions/interaction/inputlessActions/GpsSwitchOff.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/GpsSwitchOff.js +18 -0
- package/dist/automation/actions/interaction/inputlessActions/GpsSwitchOn.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/GpsSwitchOn.js +18 -0
- package/dist/automation/actions/interaction/inputlessActions/HideKeyboard.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/HideKeyboard.js +14 -0
- package/dist/automation/actions/interaction/inputlessActions/LockDevice.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/LockDevice.js +14 -0
- package/dist/automation/actions/interaction/inputlessActions/OpenChromeBrowser.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/OpenChromeBrowser.js +14 -0
- package/dist/automation/actions/interaction/inputlessActions/OpenNotification.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/OpenNotification.js +14 -0
- package/dist/automation/actions/interaction/inputlessActions/ResetApp.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/ResetApp.js +19 -0
- package/dist/automation/actions/interaction/inputlessActions/RestartCurrentDevice.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/RestartCurrentDevice.js +23 -0
- package/dist/automation/actions/interaction/inputlessActions/SetDeviceOrientationAsLandscape.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/SetDeviceOrientationAsLandscape.js +14 -0
- package/dist/automation/actions/interaction/inputlessActions/SetDeviceOrientationAsPortrait.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/SetDeviceOrientationAsPortrait.js +14 -0
- package/dist/automation/actions/interaction/inputlessActions/SetEmulatorPowerStateOff.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/SetEmulatorPowerStateOff.js +27 -0
- package/dist/automation/actions/interaction/inputlessActions/SetEmulatorPowerStateOn.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/SetEmulatorPowerStateOn.js +27 -0
- package/dist/automation/actions/interaction/inputlessActions/WifiSwitchOff.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/WifiSwitchOff.js +18 -0
- package/dist/automation/actions/interaction/inputlessActions/WifiSwitchOn.d.ts +2 -0
- package/dist/automation/actions/interaction/inputlessActions/WifiSwitchOn.js +18 -0
- package/dist/automation/actions/interaction/press/longPress.d.ts +2 -0
- package/dist/automation/actions/interaction/press/longPress.js +44 -0
- package/dist/automation/actions/interaction/press/pressHomeKey.d.ts +2 -0
- package/dist/automation/actions/interaction/press/pressHomeKey.js +20 -0
- package/dist/automation/actions/interaction/verify/VerifyAllBrokenImages.js +1 -1
- package/dist/automation/actions/interaction/verify/VerifyAllOptionsAreSelected.js +4 -3
- package/dist/automation/actions/interaction/verify/VerifyIfOptionWithIndexIsDeselectedInElement.js +2 -2
- package/dist/automation/actions/interaction/verify/VerifyIfOptionWithIndexIsSelectedInListBox.js +2 -2
- package/dist/automation/actions/interaction/verify/VerifyListBoxOptionsAreSorted.js +1 -1
- package/dist/automation/actions/interaction/verify/VerifyNumberOfElementsByTagName.js +2 -2
- package/dist/automation/actions/interaction/wait/waitTillPresenceOfAllElements.js +2 -2
- package/dist/automation/actions/interface/InputlessActionnterface.d.ts +91 -0
- package/dist/automation/actions/interface/InputlessActionnterface.js +1 -0
- package/dist/automation/actions/interface/clickActionInterface.d.ts +6 -0
- package/dist/automation/actions/interface/elementlessInterface.d.ts +55 -0
- package/dist/automation/actions/interface/elementlessInterface.js +1 -0
- package/dist/automation/actions/interface/pressActionInterface.d.ts +14 -0
- package/dist/automation/browserSession/initiateBrowserSession.d.ts +6 -2
- package/dist/automation/browserSession/initiateBrowserSession.js +16 -12
- package/dist/automation/cloudSession/initiateCloudSession.d.ts +9 -0
- package/dist/automation/cloudSession/initiateCloudSession.js +36 -0
- package/dist/automation/mobileSession/initiateMobileSession.d.ts +5 -2
- package/dist/automation/mobileSession/initiateMobileSession.js +37 -12
- package/dist/core/constants/allAction.js +2 -1
- package/dist/core/constants/defaultValues.d.ts +1 -1
- package/dist/core/constants/defaultValues.js +1 -1
- package/dist/core/constants/supportedActions.js +68 -1
- package/dist/core/interfaces/actionInterface.d.ts +29 -0
- package/dist/core/interfaces/browserCapabilitiesInterface.d.ts +19 -2
- package/dist/core/interfaces/browserCapabilitiesInterface.js +33 -1
- package/dist/core/interfaces/browserConfigurationInterface.d.ts +2 -1
- package/dist/core/interfaces/cloudConfigInterface.d.ts +9 -0
- package/dist/core/interfaces/cloudConfigInterface.js +1 -0
- package/dist/core/interfaces/executionDetails.d.ts +6 -2
- package/dist/core/interfaces/fireflinkScriptPayloadInterface.d.ts +1 -1
- package/dist/core/main/actionHandlerFactory.js +261 -15
- package/dist/core/main/executionContext.js +3 -3
- package/dist/core/main/runAutomationScript.js +33 -18
- package/dist/core/types/browserType.d.ts +1 -0
- package/dist/core/types/browserType.js +1 -0
- package/dist/core/types/cloudServerPortType.d.ts +4 -0
- package/dist/core/types/cloudServerPortType.js +4 -0
- package/dist/core/types/cloudprotocolType.d.ts +1 -0
- package/dist/core/types/cloudprotocolType.js +1 -0
- package/dist/fireflinkData/fireflinkScript/scriptGenrationData.d.ts +2 -0
- package/dist/fireflinkData/fireflinkScript/scriptGenrationData.js +4 -1
- package/dist/imageAnalysisMobile/annotatedScreenshotMobile.d.ts +4 -1
- package/dist/imageAnalysisMobile/annotatedScreenshotMobile.js +7 -4
- package/dist/index.js +0 -2
- package/dist/service/fireflink.service.d.ts +10 -0
- package/dist/service/fireflink.service.js +36 -0
- package/dist/service/kafka/fireflinkKafka.service.d.ts +1 -1
- package/dist/tests/test12.js +17 -4
- package/dist/tests/test3.d.ts +1 -2
- package/dist/tests/test3.js +23 -18
- package/dist/utils/DomExtraction/jsForAttributeInjection.js +3 -1
- package/dist/utils/browserCap/capability.d.ts +23 -0
- package/dist/utils/browserCap/capability.js +37 -0
- package/dist/utils/cloudConfig/cloudPath.d.ts +2 -0
- package/dist/utils/cloudConfig/cloudPath.js +3 -0
- package/dist/utils/helpers/enterActionHelper.js +48 -37
- package/dist/utils/helpers/xpathcreation.d.ts +6 -1
- package/dist/utils/helpers/xpathcreation.js +23 -6
- package/package.json +5 -2
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { remote } from "webdriverio";
|
|
2
2
|
import { execSync } from "child_process";
|
|
3
|
+
import { logger } from "../../utils/logger/logData.js";
|
|
4
|
+
import { CloudSession } from "../cloudSession/initiateCloudSession.js";
|
|
3
5
|
export class MobileSession {
|
|
4
|
-
constructor(appiumPort) {
|
|
5
|
-
this.
|
|
6
|
+
constructor(appiumPort, isCloud, capabilities, CloudConfig) {
|
|
7
|
+
this.driver = null;
|
|
6
8
|
this.currentAppPackage = "";
|
|
7
9
|
this.appiumPort = appiumPort;
|
|
10
|
+
this.isCloud = isCloud;
|
|
11
|
+
this.cloudSessionInstances = new CloudSession(capabilities, CloudConfig);
|
|
8
12
|
}
|
|
9
13
|
async openApp(arg) {
|
|
10
14
|
try {
|
|
@@ -22,26 +26,47 @@ export class MobileSession {
|
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
async open(arg) {
|
|
25
|
-
this.browser = await this.openApp({ capabilities: arg.capabilities });
|
|
26
29
|
const appPackage = arg.keywords[0];
|
|
27
30
|
const appActivity = arg.keywords[1];
|
|
28
31
|
this.currentAppPackage = appPackage;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
try {
|
|
33
|
+
const response = await fetch(`http://127.0.0.1:${this.appiumPort}/wd/hub/status`);
|
|
34
|
+
if (response.status !== 200) {
|
|
35
|
+
throw new Error("Appium server is not running.");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
throw new Error("Appium server is not running or unreachable.", { cause: error });
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
await execSync(`adb -s ${arg.capabilities["appium:udid"]} shell pm clear ${appPackage}`).toString();
|
|
43
|
+
await execSync(`adb -s ${arg.capabilities["appium:udid"]} shell am start -n ${appPackage}/${appActivity}`).toString();
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
const output = error.stderr?.toString() || error.message || "";
|
|
47
|
+
if (output.toLowerCase().includes("device") && output.toLowerCase().includes("not found")) {
|
|
48
|
+
throw new Error(`Device '${arg.capabilities["appium:udid"]}' not found or offline.`, { cause: error });
|
|
49
|
+
}
|
|
50
|
+
if (output.includes("Error type 3") || output.includes("does not exist") || output.includes("Failed")) {
|
|
51
|
+
throw new Error(`App not found or invalid activity: ${appPackage}/${appActivity} is not installed on the device`, { cause: error });
|
|
52
|
+
}
|
|
53
|
+
throw new Error(`ADB execution failed: ${output}`, { cause: error });
|
|
54
|
+
}
|
|
55
|
+
this.driver = this.isCloud
|
|
56
|
+
? await this.cloudSessionInstances.initialize() : await this.openApp({ capabilities: arg.capabilities });
|
|
57
|
+
logger.info(`Application launched`);
|
|
33
58
|
}
|
|
34
59
|
async close() {
|
|
35
|
-
if (this.
|
|
60
|
+
if (this.driver) {
|
|
36
61
|
const apppackage = this.currentAppPackage;
|
|
37
|
-
await this.
|
|
38
|
-
this.
|
|
62
|
+
await this.driver.terminateApp(apppackage);
|
|
63
|
+
this.driver = null;
|
|
39
64
|
}
|
|
40
65
|
}
|
|
41
66
|
async getCurrentDriver() {
|
|
42
|
-
if (!this.
|
|
67
|
+
if (!this.driver) {
|
|
43
68
|
throw new Error("Browser is not initialized");
|
|
44
69
|
}
|
|
45
|
-
return this.
|
|
70
|
+
return this.driver;
|
|
46
71
|
}
|
|
47
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DEFAULT_PAGE_LOAD =
|
|
1
|
+
export declare const DEFAULT_PAGE_LOAD = 10000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DEFAULT_PAGE_LOAD =
|
|
1
|
+
export const DEFAULT_PAGE_LOAD = 10000;
|
|
@@ -28,5 +28,72 @@ export const ELEMENTLESS_ACTION = [
|
|
|
28
28
|
"PressAnyKeyNTimes",
|
|
29
29
|
"SetClipBoardText",
|
|
30
30
|
"PressAnyKey",
|
|
31
|
-
"PressEnterKey"
|
|
31
|
+
"PressEnterKey",
|
|
32
|
+
"SwitchToNewWindowIfUrlContainsString",
|
|
33
|
+
"MOB_OpenNotification",
|
|
34
|
+
"MOB_ResetApp",
|
|
35
|
+
"MOB_HideKeyboard",
|
|
36
|
+
"MOB_SetEmulatorPowerStateOff",
|
|
37
|
+
"MOB_OpenChromeBrowser",
|
|
38
|
+
"MOB_SetDeviceOrientationAsPortrait",
|
|
39
|
+
"MOB_SetDeviceOrientationAsLandscape",
|
|
40
|
+
"MOB_SetEmulatorPowerStateOn",
|
|
41
|
+
"MOB_AirplaneModeSwitchOn",
|
|
42
|
+
"MOB_LockDevice",
|
|
43
|
+
"MOB_WifiSwitchOff",
|
|
44
|
+
"MOB_WifiSwitchOn",
|
|
45
|
+
"Continue",
|
|
46
|
+
"MOB_GpsSwitchOn",
|
|
47
|
+
"MOB_GpsSwitchOff",
|
|
48
|
+
"MOB_RestartCurrentDevice",
|
|
49
|
+
"MOB_AirplaneModeSwitchOff",
|
|
50
|
+
"Break",
|
|
51
|
+
"MOB_TapOnSpecifiedLocation",
|
|
52
|
+
"MOB_PressHomeKey",
|
|
53
|
+
"MOB_OpenMobileApplication",
|
|
54
|
+
"MOB_IsAppInstalled",
|
|
55
|
+
"MOB_ReceiveMessageOnEmulator",
|
|
56
|
+
"MOB_UninstallAPK",
|
|
57
|
+
"MOB_InstallAPK",
|
|
58
|
+
"MOB_TerminateAppUsingAppPackage",
|
|
59
|
+
"MOB_OpenAppWithApkFilePath",
|
|
60
|
+
"MOB_ActivateAppUsingAppPackage",
|
|
61
|
+
"VerifyLighthouseScore",
|
|
62
|
+
"VerifyAccessibilityScore",
|
|
63
|
+
"VerifyBrowserWindowYLocation",
|
|
64
|
+
"VerifyBrowserWindowXLocation",
|
|
65
|
+
"VerifyBrowserWindowWidth",
|
|
66
|
+
"VerifyBrowserWindowUrlIsString",
|
|
67
|
+
"VerifyBrowserWindowUrlContainsExpectedUrl",
|
|
68
|
+
"VerifyBrowserWindowTitleIsString",
|
|
69
|
+
"VerifyBrowserWindowTitleContainsString",
|
|
70
|
+
"VerifyBrowserWindowHeight",
|
|
71
|
+
"VerifyBrowserHtmlCodeContainsString",
|
|
72
|
+
"VerifyBestPracticesScore",
|
|
73
|
+
"VerifyAllBrokenImages",
|
|
74
|
+
"VerifyIfCookieNameIsDeleted",
|
|
75
|
+
"VerifyIfCookieNameIsAdded",
|
|
76
|
+
"VerifyIfBrowserWindowIsClosed",
|
|
77
|
+
"VerifyIfAllCookiesAreDeleted",
|
|
78
|
+
"VerifyIfCookieObjectIsPresent",
|
|
79
|
+
"VerifyIfImageIsBroken",
|
|
80
|
+
"VerifyIfLinkIsBroken",
|
|
81
|
+
"VerifyIfLinkIsWorking",
|
|
82
|
+
"VerifyIfLinksAreBroken",
|
|
83
|
+
"VerifyIfLinksAreWorking",
|
|
84
|
+
"VerifyIfStatusCodeOfALinkIsStatusCode",
|
|
85
|
+
"VerifyIfStatusCodesOfLinks",
|
|
86
|
+
"VerifyLinkNavigatesToTitle",
|
|
87
|
+
"VerifyNavigateURL",
|
|
88
|
+
"VerifyNumberOfElementsByTagName",
|
|
89
|
+
"VerifyNumberOfElementsByXpath",
|
|
90
|
+
"VerifyPartialTitleOfCurrentPage",
|
|
91
|
+
"VerifyPerformanceScore",
|
|
92
|
+
"VerifyPwaScore",
|
|
93
|
+
"VerifySeoScore",
|
|
94
|
+
"VerifyTitleInAllPage",
|
|
95
|
+
"VerifyTitleOfCurrentPage",
|
|
96
|
+
"VerifyAllBrowserWindowsClosed",
|
|
97
|
+
"VerifyHexCodeForGivenXYCoordinates",
|
|
98
|
+
"VerifyIfXAndYCoordinateOfElement"
|
|
32
99
|
];
|
|
@@ -228,6 +228,35 @@ export interface IActionExecutor {
|
|
|
228
228
|
getAudioHeight(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
|
|
229
229
|
getAudioDimension(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
|
|
230
230
|
getAudioDecodedByte(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
|
|
231
|
+
OpenNotification(): Promise<void>;
|
|
232
|
+
ResetApp(): Promise<void>;
|
|
233
|
+
HideKeyboard(): Promise<void>;
|
|
234
|
+
SetEmulatorPowerStateOff(): Promise<void>;
|
|
235
|
+
OpenChromeBrowser(): Promise<void>;
|
|
236
|
+
SetDeviceOrientationAsPortrait(): Promise<void>;
|
|
237
|
+
SetDeviceOrientationAsLandscape(): Promise<void>;
|
|
238
|
+
SetEmulatorPowerStateOn(): Promise<void>;
|
|
239
|
+
AirplaneModeSwitchOn(): Promise<void>;
|
|
240
|
+
LockDevice(): Promise<void>;
|
|
241
|
+
WifiSwitchOff(): Promise<void>;
|
|
242
|
+
WifiSwitchOn(): Promise<void>;
|
|
243
|
+
Continue(): Promise<void>;
|
|
244
|
+
GpsSwitchOn(): Promise<void>;
|
|
245
|
+
GpsSwitchOff(): Promise<void>;
|
|
246
|
+
RestartCurrentDevice(): Promise<void>;
|
|
247
|
+
AirplaneModeSwitchOff(): Promise<void>;
|
|
248
|
+
Break(): Promise<void>;
|
|
249
|
+
PressHomeKey(): Promise<void>;
|
|
250
|
+
TapOnSpecifiedLocation(value: string): Promise<void>;
|
|
251
|
+
OpenMobileApplication(value: string): Promise<void>;
|
|
252
|
+
IsAppInstalled(value: string): Promise<void>;
|
|
253
|
+
ReceiveMessageOnEmulator(value: string): Promise<void>;
|
|
254
|
+
UninstallAPK(value: string): Promise<void>;
|
|
255
|
+
InstallAPK(value: string): Promise<void>;
|
|
256
|
+
TerminateAppUsingAppPackage(value: string): Promise<void>;
|
|
257
|
+
OpenAppWithApkFilePath(value: string): Promise<void>;
|
|
258
|
+
ActivateAppUsingAppPackage(value: string): Promise<void>;
|
|
259
|
+
LongPress(selector: string, value: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
|
|
231
260
|
MOB_PressBackKey(): Promise<void>;
|
|
232
261
|
WaitTillPresenceOfElement(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
|
|
233
262
|
WaitTillPresenceOfAllElements(pageDOM: string, selector: string, value: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
type Browser = 'chrome' | 'firefox' | 'edge' | 'safari';
|
|
2
|
+
export declare function getCapabilities(browserName: Browser): {
|
|
3
|
+
'goog:chromeOptions'?: {
|
|
4
|
+
args: string[];
|
|
5
|
+
} | undefined;
|
|
2
6
|
browserName: string;
|
|
3
|
-
}
|
|
7
|
+
} | {
|
|
8
|
+
'moz:firefoxOptions'?: {
|
|
9
|
+
args: string[];
|
|
10
|
+
} | undefined;
|
|
11
|
+
browserName: string;
|
|
12
|
+
} | {
|
|
13
|
+
'ms:edgeOptions'?: {
|
|
14
|
+
args: string[];
|
|
15
|
+
} | undefined;
|
|
16
|
+
browserName: string;
|
|
17
|
+
} | {
|
|
18
|
+
browserName: string;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -1 +1,33 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export function getCapabilities(browserName) {
|
|
2
|
+
const isLinux = process.platform === 'linux';
|
|
3
|
+
const browserCapabilities = {
|
|
4
|
+
chrome: {
|
|
5
|
+
browserName: 'chrome',
|
|
6
|
+
...(isLinux && {
|
|
7
|
+
'goog:chromeOptions': {
|
|
8
|
+
args: ['--ozone-platform=x11']
|
|
9
|
+
}
|
|
10
|
+
})
|
|
11
|
+
},
|
|
12
|
+
firefox: {
|
|
13
|
+
browserName: 'firefox',
|
|
14
|
+
...(isLinux && {
|
|
15
|
+
'moz:firefoxOptions': {
|
|
16
|
+
args: ['-headless']
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
},
|
|
20
|
+
edge: {
|
|
21
|
+
browserName: 'MicrosoftEdge',
|
|
22
|
+
...(isLinux && {
|
|
23
|
+
'ms:edgeOptions': {
|
|
24
|
+
args: ['--ozone-platform=x11']
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
},
|
|
28
|
+
safari: {
|
|
29
|
+
browserName: 'safari'
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return browserCapabilities[browserName];
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BrowserConfig } from "./browserConfigurationInterface.js";
|
|
2
|
+
import { CloudConfig } from "./cloudConfigInterface.js";
|
|
2
3
|
import { platform } from "../types/scriptTypesType.js";
|
|
3
4
|
import { Producer } from "kafkajs";
|
|
4
5
|
export interface AutomationRequest {
|
|
@@ -27,6 +28,9 @@ export interface AutomationRequest {
|
|
|
27
28
|
token: string;
|
|
28
29
|
appiumPort: number;
|
|
29
30
|
realDeviceId: string;
|
|
30
|
-
|
|
31
|
-
kafkaProducerInstance: Producer;
|
|
31
|
+
platformVersion: string;
|
|
32
|
+
kafkaProducerInstance: Producer | any;
|
|
33
|
+
isCloud?: boolean;
|
|
34
|
+
capabilities?: Record<string, any>;
|
|
35
|
+
cloudConfig?: CloudConfig;
|
|
32
36
|
}
|
|
@@ -27,7 +27,7 @@ export interface IPayload {
|
|
|
27
27
|
export interface IFireFlinkApiService {
|
|
28
28
|
getInstancesDetailsApi(headers: Record<string, string>, url: string): Promise<any>;
|
|
29
29
|
}
|
|
30
|
-
export interface
|
|
30
|
+
export interface IFireflinkService {
|
|
31
31
|
runGetInstancesDetails(projectId: string, token: string, serverHost: string): Promise<any>;
|
|
32
32
|
}
|
|
33
33
|
export interface IKafkaPayload {
|
|
@@ -38,7 +38,7 @@ export function createActionHandlers(context) {
|
|
|
38
38
|
await context.androidSession.open({
|
|
39
39
|
capabilities: {
|
|
40
40
|
platformName: "Android",
|
|
41
|
-
"appium:platformVersion": context.request.
|
|
41
|
+
"appium:platformVersion": context.request.platformVersion,
|
|
42
42
|
"appium:deviceName": "AndroidDevice",
|
|
43
43
|
"appium:udid": context.request.realDeviceId,
|
|
44
44
|
"appium:automationName": "UiAutomator2",
|
|
@@ -506,6 +506,183 @@ export function createActionHandlers(context) {
|
|
|
506
506
|
GetSize: withExecutor(async (executor, result) => {
|
|
507
507
|
await executor.getSize(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
508
508
|
}),
|
|
509
|
+
VerifyAttributeValue: withExecutor(async (executor, result) => {
|
|
510
|
+
await executor.VerifyAttributeValue(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
511
|
+
}),
|
|
512
|
+
VerifyPartialAttributeValue: withExecutor(async (executor, result) => {
|
|
513
|
+
await executor.VerifyPartialAttributeValue(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
514
|
+
}),
|
|
515
|
+
VerifyTagName: withExecutor(async (executor, result) => {
|
|
516
|
+
await executor.VerifyTagName(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
517
|
+
}),
|
|
518
|
+
VerifyTitleOfCurrentPage: withExecutor(async (executor, result) => {
|
|
519
|
+
await executor.VerifyTitleOfCurrentPage(result.value);
|
|
520
|
+
}),
|
|
521
|
+
VerifyPartialTitleOfCurrentPage: withExecutor(async (executor, result) => {
|
|
522
|
+
await executor.VerifyPartialTitleOfCurrentPage(result.value);
|
|
523
|
+
}),
|
|
524
|
+
VerifyNavigateURL: withExecutor(async (executor, result) => {
|
|
525
|
+
await executor.VerifyNavigateURL(result.value);
|
|
526
|
+
}),
|
|
527
|
+
VerifyValueOfElementIsString: withExecutor(async (executor, result) => {
|
|
528
|
+
await executor.VerifyValueOfElementIsString(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
529
|
+
}),
|
|
530
|
+
VerifyValueOfElementContainsString: withExecutor(async (executor, result) => {
|
|
531
|
+
await executor.VerifyValueOfElementContainsString(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
532
|
+
}),
|
|
533
|
+
VerifyValueOfElementIsCleared: withExecutor(async (executor, result) => {
|
|
534
|
+
await executor.VerifyValueOfElementIsCleared(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
535
|
+
}),
|
|
536
|
+
VerifyXLocationOfElement: withExecutor(async (executor, result) => {
|
|
537
|
+
await executor.VerifyXLocationOfElement(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
538
|
+
}),
|
|
539
|
+
VerifyYLocationOfElement: withExecutor(async (executor, result) => {
|
|
540
|
+
await executor.VerifyYLocationOfElement(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
541
|
+
}),
|
|
542
|
+
VerifyHeightOfWebElement: withExecutor(async (executor, result) => {
|
|
543
|
+
await executor.VerifyHeightOfWebElement(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
544
|
+
}),
|
|
545
|
+
VerifyWidthOfElement: withExecutor(async (executor, result) => {
|
|
546
|
+
await executor.VerifyWidthOfElement(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
547
|
+
}),
|
|
548
|
+
VerifyRadioButtonIsSelected: withExecutor(async (executor, result) => {
|
|
549
|
+
await executor.VerifyRadioButtonIsSelected(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
550
|
+
}),
|
|
551
|
+
VerifyRadioButtonIsNotSelected: withExecutor(async (executor, result) => {
|
|
552
|
+
await executor.VerifyRadioButtonIsNotSelected(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
553
|
+
}),
|
|
554
|
+
VerifyBrowserWindowWidth: withExecutor(async (executor, result) => {
|
|
555
|
+
await executor.VerifyBrowserWindowWidth(result.value);
|
|
556
|
+
}),
|
|
557
|
+
VerifyBrowserWindowHeight: withExecutor(async (executor, result) => {
|
|
558
|
+
await executor.VerifyBrowserWindowHeight(result.value);
|
|
559
|
+
}),
|
|
560
|
+
VerifyBrowserWindowXLocation: withExecutor(async (executor, result) => {
|
|
561
|
+
await executor.VerifyBrowserWindowXLocation(result.value);
|
|
562
|
+
}),
|
|
563
|
+
VerifyBrowserWindowYLocation: withExecutor(async (executor, result) => {
|
|
564
|
+
await executor.VerifyBrowserWindowYLocation(result.value);
|
|
565
|
+
}),
|
|
566
|
+
VerifyBrowserHtmlCodeContainsString: withExecutor(async (executor, result) => {
|
|
567
|
+
await executor.VerifyBrowserHtmlCodeContainsString(result.value);
|
|
568
|
+
}),
|
|
569
|
+
VerifyIfCookieNameIsAdded: withExecutor(async (executor, result) => {
|
|
570
|
+
await executor.VerifyIfCookieNameIsAdded(result.value);
|
|
571
|
+
}),
|
|
572
|
+
VerifyIfCookieNameIsDeleted: withExecutor(async (executor, result) => {
|
|
573
|
+
await executor.VerifyIfCookieNameIsDeleted(result.value);
|
|
574
|
+
}),
|
|
575
|
+
VerifyIfLinkIsBroken: withExecutor(async (executor, result) => {
|
|
576
|
+
await executor.VerifyIfLinkIsBroken(result.value);
|
|
577
|
+
}),
|
|
578
|
+
VerifyCssAttributeValue: withExecutor(async (executor, result) => {
|
|
579
|
+
await executor.VerifyCssAttributeValue(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
580
|
+
}),
|
|
581
|
+
VerifyIfVideoIsPlaying: withExecutor(async (executor, result) => {
|
|
582
|
+
await executor.VerifyIfVideoIsPlaying(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
583
|
+
}),
|
|
584
|
+
VerifyNumberOfElementsByTagName: withExecutor(async (executor, result) => {
|
|
585
|
+
await executor.VerifyNumberOfElementsByTagName(result.value);
|
|
586
|
+
}),
|
|
587
|
+
VerifyNumberOfElementsByXpath: withExecutor(async (executor, result) => {
|
|
588
|
+
await executor.VerifyNumberOfElementsByXpath(result.value);
|
|
589
|
+
}),
|
|
590
|
+
VerifyListBoxOptionsAreSorted: withExecutor(async (executor, result) => {
|
|
591
|
+
await executor.VerifyListBoxOptionsAreSorted(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
592
|
+
}),
|
|
593
|
+
VerifyIfOptionWithIndexIsSelectedInListBox: withExecutor(async (executor, result) => {
|
|
594
|
+
await executor.VerifyIfOptionWithIndexIsSelectedInListBox(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
595
|
+
}),
|
|
596
|
+
VerifyIfOptionWithIndexIsDeselectedInElement: withExecutor(async (executor, result) => {
|
|
597
|
+
await executor.VerifyIfOptionWithIndexIsDeselectedInElement(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
598
|
+
}),
|
|
599
|
+
VerifyAllOptionsAreSelected: withExecutor(async (executor, result) => {
|
|
600
|
+
await executor.VerifyAllOptionsAreSelected(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
601
|
+
}),
|
|
602
|
+
VerifyAllOptionsAreDeselected: withExecutor(async (executor, result) => {
|
|
603
|
+
await executor.VerifyAllOptionsAreDeselected(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
604
|
+
}),
|
|
605
|
+
VerifyIfOptionWithValueIsSelected: withExecutor(async (executor, result) => {
|
|
606
|
+
await executor.VerifyIfOptionWithValueIsSelected(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
607
|
+
}),
|
|
608
|
+
VerifyIfOptionWithValueIsDeselected: withExecutor(async (executor, result) => {
|
|
609
|
+
await executor.VerifyIfOptionWithValueIsDeselected(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
610
|
+
}),
|
|
611
|
+
VerifyIfSpecifiedOptionIsSelected: withExecutor(async (executor, result) => {
|
|
612
|
+
await executor.VerifyIfSpecifiedOptionIsSelected(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
613
|
+
}),
|
|
614
|
+
VerifyThatSpecifiedOptionIsNotSelected: withExecutor(async (executor, result) => {
|
|
615
|
+
await executor.VerifyThatSpecifiedOptionIsNotSelected(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
616
|
+
}),
|
|
617
|
+
VerifyIfGivenOptionIsDuplicate: withExecutor(async (executor, result) => {
|
|
618
|
+
await executor.VerifyIfGivenOptionIsDuplicate(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
619
|
+
}),
|
|
620
|
+
VerifyTitleInAllPage: withExecutor(async (executor, result) => {
|
|
621
|
+
await executor.VerifyTitleInAllPage(result.value);
|
|
622
|
+
}),
|
|
623
|
+
VerifyLinkNavigatesToTitle: withExecutor(async (executor, result) => {
|
|
624
|
+
await executor.VerifyLinkNavigatesToTitle(result.value);
|
|
625
|
+
}),
|
|
626
|
+
VerifyBrowserWindowTitleContainsString: withExecutor(async (executor, result) => {
|
|
627
|
+
await executor.VerifyBrowserWindowTitleContainsString(result.value);
|
|
628
|
+
}),
|
|
629
|
+
VerifyBrowserWindowUrlIsString: withExecutor(async (executor, result) => {
|
|
630
|
+
await executor.VerifyBrowserWindowUrlIsString(result.value);
|
|
631
|
+
}),
|
|
632
|
+
VerifyBrowserWindowUrlContainsExpectedUrl: withExecutor(async (executor, result) => {
|
|
633
|
+
await executor.VerifyBrowserWindowUrlContainsExpectedUrl(result.value);
|
|
634
|
+
}),
|
|
635
|
+
VerifyCheckBoxIsNotSelected: withExecutor(async (executor, result) => {
|
|
636
|
+
await executor.VerifyCheckBoxIsNotSelected(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
637
|
+
}),
|
|
638
|
+
VerifyCheckBoxIsSelected: withExecutor(async (executor, result) => {
|
|
639
|
+
await executor.VerifyCheckBoxIsSelected(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
640
|
+
}),
|
|
641
|
+
VerifyBrowserWindowTitleIsString: withExecutor(async (executor, result) => {
|
|
642
|
+
await executor.VerifyBrowserWindowTitleIsString(result.value);
|
|
643
|
+
}),
|
|
644
|
+
VerifyIfBrowserWindowIsClosed: withExecutor(async (executor) => {
|
|
645
|
+
await executor.VerifyIfBrowserWindowIsClosed();
|
|
646
|
+
}),
|
|
647
|
+
VerifyAllBrowserWindowsClosed: withExecutor(async (executor) => {
|
|
648
|
+
await executor.VerifyAllBrowserWindowsClosed();
|
|
649
|
+
}),
|
|
650
|
+
VerifyIfAllCookiesAreDeleted: withExecutor(async (executor) => {
|
|
651
|
+
await executor.VerifyIfAllCookiesAreDeleted();
|
|
652
|
+
}),
|
|
653
|
+
VerifyIfCookieObjectIsPresent: withExecutor(async (executor, result) => {
|
|
654
|
+
await executor.VerifyIfCookieObjectIsPresent(result.value);
|
|
655
|
+
}),
|
|
656
|
+
VerifyIfXAndYCoordinateOfElement: withExecutor(async (executor, result) => {
|
|
657
|
+
await executor.VerifyIfXAndYCoordinateOfElement(result.pageDOM, result.selector, result.value, result.fireflinkIndex, result.elementName, result.elementType);
|
|
658
|
+
}),
|
|
659
|
+
VerifyIfVideoIsMuted: withExecutor(async (executor, result) => {
|
|
660
|
+
await executor.VerifyIfVideoIsMuted(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
661
|
+
}),
|
|
662
|
+
VerifyIfVideoIsPaused: withExecutor(async (executor, result) => {
|
|
663
|
+
await executor.VerifyIfVideoIsPaused(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
664
|
+
}),
|
|
665
|
+
VerifyIfVideoEnded: withExecutor(async (executor, result) => {
|
|
666
|
+
await executor.VerifyIfVideoEnded(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
667
|
+
}),
|
|
668
|
+
VerifyIfVideoPlayingInMute: withExecutor(async (executor, result) => {
|
|
669
|
+
await executor.VerifyIfVideoPlayingInMute(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
670
|
+
}),
|
|
671
|
+
VerifyIfVideoPlayingInUnmute: withExecutor(async (executor, result) => {
|
|
672
|
+
await executor.VerifyIfVideoPlayingInUnmute(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
673
|
+
}),
|
|
674
|
+
VerifyIfAudioIsPlaying: withExecutor(async (executor, result) => {
|
|
675
|
+
await executor.VerifyIfAudioIsPlaying(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
676
|
+
}),
|
|
677
|
+
VerifyIfAudioIsPaused: withExecutor(async (executor, result) => {
|
|
678
|
+
await executor.VerifyIfAudioIsPaused(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
679
|
+
}),
|
|
680
|
+
VerifyIfAudioIsMuted: withExecutor(async (executor, result) => {
|
|
681
|
+
await executor.VerifyIfAudioIsMuted(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
682
|
+
}),
|
|
683
|
+
VerifyIfAudioEnded: withExecutor(async (executor, result) => {
|
|
684
|
+
await executor.VerifyIfAudioEnded(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
685
|
+
}),
|
|
509
686
|
VerifyIfLinkIsWorking: withExecutor(async (executor, result) => {
|
|
510
687
|
await executor.VerifyIfLinkIsWorking(result.value);
|
|
511
688
|
}),
|
|
@@ -637,26 +814,95 @@ export function createActionHandlers(context) {
|
|
|
637
814
|
GetAudioDecodedByte: withExecutor(async (executor, result) => {
|
|
638
815
|
await executor.getAudioDecodedByte(result.pageDOM, result.selector, result.fireflinkIndex, result.elementName, result.elementType);
|
|
639
816
|
}),
|
|
640
|
-
|
|
641
|
-
await executor.
|
|
817
|
+
MOB_OpenNotification: withExecutor(async (executor) => {
|
|
818
|
+
await executor.OpenNotification();
|
|
642
819
|
}),
|
|
643
|
-
|
|
644
|
-
await executor.
|
|
820
|
+
MOB_PressEnterKey: withExecutor(async (executor) => {
|
|
821
|
+
await executor.PressEnterKey();
|
|
645
822
|
}),
|
|
646
|
-
|
|
647
|
-
await executor.
|
|
823
|
+
MOB_ResetApp: withExecutor(async (executor) => {
|
|
824
|
+
await executor.ResetApp();
|
|
648
825
|
}),
|
|
649
|
-
|
|
650
|
-
await executor.
|
|
826
|
+
MOB_HideKeyboard: withExecutor(async (executor) => {
|
|
827
|
+
await executor.HideKeyboard();
|
|
651
828
|
}),
|
|
652
|
-
|
|
653
|
-
await executor.
|
|
829
|
+
MOB_SetEmulatorPowerStateOff: withExecutor(async (executor) => {
|
|
830
|
+
await executor.SetEmulatorPowerStateOff();
|
|
654
831
|
}),
|
|
655
|
-
|
|
656
|
-
await executor.
|
|
832
|
+
MOB_OpenChromeBrowser: withExecutor(async (executor) => {
|
|
833
|
+
await executor.OpenChromeBrowser();
|
|
657
834
|
}),
|
|
658
|
-
|
|
659
|
-
await executor.
|
|
835
|
+
MOB_SetDeviceOrientationAsPortrait: withExecutor(async (executor) => {
|
|
836
|
+
await executor.SetDeviceOrientationAsPortrait();
|
|
837
|
+
}),
|
|
838
|
+
MOB_SetDeviceOrientationAsLandscape: withExecutor(async (executor) => {
|
|
839
|
+
await executor.SetDeviceOrientationAsLandscape();
|
|
840
|
+
}),
|
|
841
|
+
MOB_SetEmulatorPowerStateOn: withExecutor(async (executor) => {
|
|
842
|
+
await executor.SetEmulatorPowerStateOn();
|
|
843
|
+
}),
|
|
844
|
+
MOB_AirplaneModeSwitchOn: withExecutor(async (executor) => {
|
|
845
|
+
await executor.AirplaneModeSwitchOn();
|
|
846
|
+
}),
|
|
847
|
+
MOB_LockDevice: withExecutor(async (executor) => {
|
|
848
|
+
await executor.LockDevice();
|
|
849
|
+
}),
|
|
850
|
+
MOB_WifiSwitchOff: withExecutor(async (executor) => {
|
|
851
|
+
await executor.WifiSwitchOff();
|
|
852
|
+
}),
|
|
853
|
+
MOB_WifiSwitchOn: withExecutor(async (executor) => {
|
|
854
|
+
await executor.WifiSwitchOn();
|
|
855
|
+
}),
|
|
856
|
+
Continue: withExecutor(async (executor) => {
|
|
857
|
+
await executor.Continue();
|
|
858
|
+
}),
|
|
859
|
+
MOB_GpsSwitchOn: withExecutor(async (executor) => {
|
|
860
|
+
await executor.GpsSwitchOn();
|
|
861
|
+
}),
|
|
862
|
+
MOB_GpsSwitchOff: withExecutor(async (executor) => {
|
|
863
|
+
await executor.GpsSwitchOff();
|
|
864
|
+
}),
|
|
865
|
+
MOB_RestartCurrentDevice: withExecutor(async (executor) => {
|
|
866
|
+
await executor.RestartCurrentDevice();
|
|
867
|
+
}),
|
|
868
|
+
MOB_AirplaneModeSwitchOff: withExecutor(async (executor) => {
|
|
869
|
+
await executor.AirplaneModeSwitchOff();
|
|
870
|
+
}),
|
|
871
|
+
Break: withExecutor(async (executor) => {
|
|
872
|
+
await executor.Break();
|
|
873
|
+
}),
|
|
874
|
+
MOB_PressHomeKey: withExecutor(async (executor) => {
|
|
875
|
+
await executor.PressHomeKey();
|
|
876
|
+
}),
|
|
877
|
+
MOB_TapOnSpecifiedLocation: withExecutor(async (executor, result) => {
|
|
878
|
+
await executor.TapOnSpecifiedLocation(result.value);
|
|
879
|
+
}),
|
|
880
|
+
MOB_OpenMobileApplication: withExecutor(async (executor, result) => {
|
|
881
|
+
await executor.OpenMobileApplication(result.value);
|
|
882
|
+
}),
|
|
883
|
+
MOB_IsAppInstalled: withExecutor(async (executor, result) => {
|
|
884
|
+
await executor.IsAppInstalled(result.value);
|
|
885
|
+
}),
|
|
886
|
+
MOB_ReceiveMessageOnEmulator: withExecutor(async (executor, result) => {
|
|
887
|
+
await executor.ReceiveMessageOnEmulator(result.value);
|
|
888
|
+
}),
|
|
889
|
+
MOB_UninstallAPK: withExecutor(async (executor, result) => {
|
|
890
|
+
await executor.UninstallAPK(result.value);
|
|
891
|
+
}),
|
|
892
|
+
MOB_InstallAPK: withExecutor(async (executor, result) => {
|
|
893
|
+
await executor.InstallAPK(result.value);
|
|
894
|
+
}),
|
|
895
|
+
MOB_TerminateAppUsingAppPackage: withExecutor(async (executor, result) => {
|
|
896
|
+
await executor.TerminateAppUsingAppPackage(result.value);
|
|
897
|
+
}),
|
|
898
|
+
MOB_OpenAppWithApkFilePath: withExecutor(async (executor, result) => {
|
|
899
|
+
await executor.OpenAppWithApkFilePath(result.value);
|
|
900
|
+
}),
|
|
901
|
+
MOB_ActivateAppUsingAppPackage: withExecutor(async (executor, result) => {
|
|
902
|
+
await executor.ActivateAppUsingAppPackage(result.value);
|
|
903
|
+
}),
|
|
904
|
+
MOB_LongPress: withExecutor(async (executor, result) => {
|
|
905
|
+
await executor.LongPress(result.selector, result.value, result.elementName, result.elementType);
|
|
660
906
|
}),
|
|
661
907
|
MOB_PressBackKey: withExecutor(async (executor) => {
|
|
662
908
|
await executor.MOB_PressBackKey();
|
|
@@ -7,9 +7,9 @@ export class ExecutionContext {
|
|
|
7
7
|
constructor(request) {
|
|
8
8
|
this.request = request;
|
|
9
9
|
this.executor = null;
|
|
10
|
-
this.session = new BrowserSession(request.browser.browserName, DEFAULT_PAGE_LOAD);
|
|
10
|
+
this.session = new BrowserSession(request.browser.browserName, request.isCloud, request.capabilities, DEFAULT_PAGE_LOAD, request.cloudConfig);
|
|
11
11
|
this.locator = new ElementGetter();
|
|
12
|
-
this.scriptAppender = new ScriptDataAppender();
|
|
13
|
-
this.androidSession = new MobileSession(request.appiumPort);
|
|
12
|
+
this.scriptAppender = new ScriptDataAppender(request.isCloud);
|
|
13
|
+
this.androidSession = new MobileSession(request.appiumPort, request.isCloud, request.capabilities, request.cloudConfig);
|
|
14
14
|
}
|
|
15
15
|
}
|