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
|
@@ -18,6 +18,7 @@ export async function combinedActionExtractorPromptMob({ extractedDomJson, prior
|
|
|
18
18
|
Given the step, the simplified DOM: ${extractedDomJson}, and the list of NLP names: ${nlpList}.
|
|
19
19
|
|
|
20
20
|
Select the perfect matching NLP name from the list that best fits the step's intent.
|
|
21
|
+
if step has only word continue or break then return nlpName as continue or break only if they dont have any action in step.
|
|
21
22
|
|
|
22
23
|
Return **only valid JSON** in the following format:
|
|
23
24
|
{
|
|
@@ -25,7 +26,7 @@ Return **only valid JSON** in the following format:
|
|
|
25
26
|
"nlpName": "x",
|
|
26
27
|
"input_text":"x",
|
|
27
28
|
"keyword": "x",
|
|
28
|
-
"
|
|
29
|
+
"elementType": "x",
|
|
29
30
|
"keycode": "x"
|
|
30
31
|
}
|
|
31
32
|
Rules:
|
|
@@ -37,7 +38,7 @@ Rules:
|
|
|
37
38
|
- Extract keyword from the step, if the step contains any keyword.
|
|
38
39
|
- Extract keycode of keys if the step contains any key name like ENTER,SPACE,BACKSPACE etc and give keycode of the given key.
|
|
39
40
|
- Use the closest semantic match for the step; return attribute_value as Fire-Flink-0, only if nothing is found.
|
|
40
|
-
- Based on step give most relevant type of element. use this list to choose
|
|
41
|
+
- Based on step give most relevant type of element. use this list to choose elementType: ${elementType} and Never change syntax of elementType, follow the syntax of elementType in list.if elementType is not there in list return 'link'.
|
|
41
42
|
- Respond with valid JSON only.
|
|
42
43
|
`;
|
|
43
44
|
return prompt;
|
|
@@ -13,7 +13,7 @@ Return **only valid JSON** in the following format:\n
|
|
|
13
13
|
"attribute_value": "Fire-Flink-x",
|
|
14
14
|
"input_text": "x",
|
|
15
15
|
"keyword": "x",
|
|
16
|
-
"
|
|
16
|
+
"elementType": "x",
|
|
17
17
|
"nlpName": "x"
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -22,8 +22,14 @@ You are an AI assistant. For the step, extract the element keyword from the step
|
|
|
22
22
|
- Use context from all steps: ${JSON.stringify(priorAndNextSteps)}, keyword and filtered dom to search for FF-inspecter.
|
|
23
23
|
**nlpName: MOB_PressBackKey or MOB_PressHomeKey for mobile navigation respective buttons like back and home**
|
|
24
24
|
- **If step is tap on element of referenece element,if multiple elements are there ,choose element which is related to reference element.The element can be reference element's before or after sibling nodes in filtered dom json.**
|
|
25
|
+
- If step is enter input into element try to find ff inspector attribute value of element not input text.
|
|
25
26
|
- **For step if you can't find perfect matching element or no attribute in filtered dom JSON is related to step return attribute_value as Fire-Flink-0.**
|
|
26
27
|
- Don't think if type of element is found it is exact element, check with keyword and step.If it is not matched return Fire-Flink-0.
|
|
28
|
+
**important example: step: "click on login below user login"
|
|
29
|
+
simplified json: login - ff-inspect-300
|
|
30
|
+
user login - ff-inspect-790
|
|
31
|
+
login - ff-inspect-803
|
|
32
|
+
then should return login - ff-inspect-803 witch is near to user reference element user login - ff-inspect-790**
|
|
27
33
|
- **Find the FF-inspecter attribute value of the element in the filtered dom JSON whose text or content-desc or other attributes best or perfect match for the step.**
|
|
28
34
|
- nlpName: Extract nlpName from the list of nlps: ${Actions} based on the step.
|
|
29
35
|
- For taping action dont take attribute_value of the node contining edittext in class, resource-id.
|
|
@@ -33,7 +39,7 @@ You are an AI assistant. For the step, extract the element keyword from the step
|
|
|
33
39
|
- and for this MOB_TapNTimes nlps send number of times to tap as input_text.
|
|
34
40
|
- nlpName: wait for wait action, and in input_text give time to wait. like sleep for 30 seconds, here nlpName is wait and input_text is 30.
|
|
35
41
|
- Extract input text from step for all actions,if input is not there give empty string "".
|
|
36
|
-
- Based on step give most relevant type of element. use this list to choose
|
|
42
|
+
- Based on step give most relevant type of element. use this list to choose elementType: ${elementType} and Never change syntax of elementType, follow the syntax of elementType in list.if elementType is not there in list return 'link'.
|
|
37
43
|
- Respond with valid JSON only.
|
|
38
44
|
|
|
39
45
|
filtered dom JSON: ${extractedDomJson}
|
|
@@ -21,7 +21,7 @@ Return **only valid JSON** in the following format:
|
|
|
21
21
|
"nlpName": "x",
|
|
22
22
|
"input_text":"x"
|
|
23
23
|
"keyword": "x",
|
|
24
|
-
"
|
|
24
|
+
"elementType": "x",
|
|
25
25
|
"locator_type": "x",
|
|
26
26
|
"attribute_type": "x"
|
|
27
27
|
}
|
|
@@ -36,7 +36,7 @@ Rules:
|
|
|
36
36
|
- Extract keyword from the step, if the step contains any keyword.
|
|
37
37
|
- Use the closest semantic match for the step; return attribute_value as Fire-Flink-0, only if nothing is found.
|
|
38
38
|
- if step is get location of device or get device location then map to MOB_GetDeviceLocation nlp.
|
|
39
|
-
- Based on step give most relevant type of element. use this list to choose
|
|
39
|
+
- Based on step give most relevant type of element. use this list to choose elementType: ${elementType} and Never change syntax of elementType, follow the syntax of elementType in list.if elementType is not there in list return 'link'.
|
|
40
40
|
- Extract locator_type if mentioned in the step, like(text,resource-id,content-desc,xpath)
|
|
41
41
|
- Extract attribute_type if mentioned in the step, like (text,resource-id,content-desc,className).
|
|
42
42
|
- Respond with valid JSON only.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export async function keywordExtractorMobile({ priorAndNextSteps }) {
|
|
2
|
-
const allowedActions = ["openApp", "tap", "enter", "wait", "verify", "scroll", "get", "close"];
|
|
2
|
+
const allowedActions = ["openApp", "tap", "enter", "wait", "verify", "scroll", "get", "close", "combined"];
|
|
3
3
|
const prompt = `
|
|
4
4
|
You are an expert in mobile app testing.
|
|
5
5
|
From the step, extract ONLY the meaningful keywords so that i can search for the element in the dom.
|
|
6
6
|
Rules:
|
|
7
|
-
- understand the step and context from the ${priorAndNextSteps}.and only extract keywords from current step and dont extract from
|
|
7
|
+
- understand the step and context from the ${priorAndNextSteps}.and only extract keywords from current step and dont extract from prior and next steps.
|
|
8
8
|
- 3 to 5 keywords maximum.
|
|
9
9
|
- If the step is about luanching an app or opening app, like (action, param1, param2) or(action,'param1,param2') then wrap them into array and give them as keywords like ['com.app.android', 'com.app.activity']
|
|
10
10
|
and also give them in the format (launch app, 'com.app.android', 'com.app.activity') like first package name and second activity name. if any separator exists (- / | :), split on it.
|
|
11
11
|
If they mention package:com.app.android and activity:com.app.activity remove variable name and then convert them into ['com.app.android, 'com.app.activity']
|
|
12
|
-
- If the step is about entering text, Do NOT include entered input values from the step.
|
|
12
|
+
- If the step is about entering text, Do NOT include entered input values from the step in keywords.
|
|
13
13
|
- First keywords should be from step next Keywords must be distinct and based on the element's label meaning only.
|
|
14
|
-
- **Keywords can be string or number if the step contains a number it can be any number,must include that number in keywords.**
|
|
14
|
+
- **Keywords can be string or number if the step contains a number it can be any number,must include that number in keywords and give it in string format.**
|
|
15
15
|
- Do Not include any other unrelated keywords for step.
|
|
16
16
|
- Do NOT include generic UI words (button, field, etc) and action words (tap, click, press, etc).
|
|
17
17
|
- Do NOT include status/technical words (displayed, enabled, authenticate, visible).
|
|
18
18
|
- If an element label contains multiple words (e.g., "Sign In", "Add to Cart"), keep them together as ONE keyword and do not split them and also for keywords you generated, do not split them.
|
|
19
19
|
-** element_name: extract name of the element that mentioned in the step not from keywords or other steps.(eg:tap on x -> element_name:x). always try to retuen short and meaning full element name from step**
|
|
20
|
-
- action: openApp for opening or launching of app, tap for taping or selecting or clicking or
|
|
21
|
-
- action must be one of from this list ${allowedActions}.if not one of them, return '
|
|
20
|
+
- action: openApp for opening or launching of app, tap for taping or selecting or clicking or press, enter for entering input, wait for waiting or sleeping, verify for verifying or checking,scroll for scrolling and swiping, get for getting,fetching element, closeApp for closing the app.
|
|
21
|
+
- action must be one of from this list ${allowedActions}.if not one of them, return action as 'combined'. if step about set or find or open chrome browser or open app with apk path or install apk or uninstall apk or activate or terminate action return action as 'combined'
|
|
22
22
|
Respond only with JSON using this format:
|
|
23
23
|
{
|
|
24
24
|
"keywords": [key1,key2,key3,key4,key5] if step is opening app then keywords should be like [app package,app activity],
|
|
@@ -21,7 +21,7 @@ Return **only valid JSON** in the following format:
|
|
|
21
21
|
"nlpName": "x",
|
|
22
22
|
"input_text":"x"
|
|
23
23
|
"keyword": "x",
|
|
24
|
-
"
|
|
24
|
+
"elementType": "x",
|
|
25
25
|
"locator_type":"x"
|
|
26
26
|
}
|
|
27
27
|
Rules:
|
|
@@ -38,7 +38,7 @@ Rules:
|
|
|
38
38
|
- Extract input_text from the step that is which is being verified in the {step}, if you can't find any input text in the step, return keyword as input_text.
|
|
39
39
|
- Extract keyword from the step, if the step contains any keyword.
|
|
40
40
|
- Use the closest semantic match for the step; return attribute_value as Fire-Flink-0, only if nothing is found.
|
|
41
|
-
- Based on step give most relevant type of element. use this list to choose
|
|
41
|
+
- Based on step give most relevant type of element. use this list to choose elementType: ${elementType} and Never change syntax of elementType, follow the syntax of elementType in list.if elementType is not there in list return 'link'.
|
|
42
42
|
- Extract locator_type if mentioned in the step, like(text,resource-id,content-desc) . if not found return 'empty'.
|
|
43
43
|
- Respond with valid JSON only.
|
|
44
44
|
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export async function visionPromptMobile({ priorAndNextSteps }) {
|
|
2
2
|
const customPromptText = `
|
|
3
3
|
You are a precise mobile automation assistant.
|
|
4
|
-
- You are given an image containing multiple elements outlined with
|
|
4
|
+
- You are given an image containing multiple elements outlined with bounding boxes.Each bounding box has a small black index number label drawn above it (like 1, 2, 3...).
|
|
5
5
|
- Do not treat numbers appearing in the step as index numbers.if any number appears in the step it is not an index number.
|
|
6
6
|
- Use the context from the all steps ${priorAndNextSteps}
|
|
7
7
|
- **Analyze the user's step and action done by that step action determine which UI element in the screenshot corresponds semantically to that action.
|
|
@@ -16,7 +16,7 @@ Return **only valid JSON** in the following format:
|
|
|
16
16
|
"nlpName": "x",
|
|
17
17
|
"input_text":"x"
|
|
18
18
|
"keyword": "x",
|
|
19
|
-
"
|
|
19
|
+
"elementType": "x"
|
|
20
20
|
}
|
|
21
21
|
Rules:
|
|
22
22
|
- nlpName must be exactly one from the provided list.
|
|
@@ -29,7 +29,7 @@ Rules:
|
|
|
29
29
|
- Extract input_text from the step, if you can't find any input text in the step, return keyword as input_text.
|
|
30
30
|
- Extract keyword from the step, if the step contains any keyword.
|
|
31
31
|
- Use the closest semantic match for the step; return attribute_value as Fire-Flink-0, only if nothing is found.
|
|
32
|
-
- Based on step give most relevant type of element. use this list to choose
|
|
32
|
+
- Based on step give most relevant type of element. use this list to choose elementType: ${elementType} and Never change syntax of elementType, follow the syntax of elementType in list.if elementType is not there in list return 'link'.
|
|
33
33
|
- Respond with valid JSON only.
|
|
34
34
|
`;
|
|
35
35
|
return prompt;
|
|
@@ -260,4 +260,33 @@ export declare class ActionExecutor implements IActionExecutor {
|
|
|
260
260
|
WaitTillElementHasText(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
|
|
261
261
|
WaitTillElementContainsText(pageDOM: string, selector: string, value: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
|
|
262
262
|
PressEnterKey(): Promise<void>;
|
|
263
|
+
OpenNotification(): Promise<void>;
|
|
264
|
+
AirplaneModeSwitchOff(): Promise<void>;
|
|
265
|
+
AirplaneModeSwitchOn(): Promise<void>;
|
|
266
|
+
Break(): Promise<void>;
|
|
267
|
+
Continue(): Promise<void>;
|
|
268
|
+
GpsSwitchOff(): Promise<void>;
|
|
269
|
+
GpsSwitchOn(): Promise<void>;
|
|
270
|
+
HideKeyboard(): Promise<void>;
|
|
271
|
+
LockDevice(): Promise<void>;
|
|
272
|
+
OpenChromeBrowser(): Promise<void>;
|
|
273
|
+
ResetApp(): Promise<void>;
|
|
274
|
+
RestartCurrentDevice(): Promise<void>;
|
|
275
|
+
SetDeviceOrientationAsLandscape(): Promise<void>;
|
|
276
|
+
SetDeviceOrientationAsPortrait(): Promise<void>;
|
|
277
|
+
SetEmulatorPowerStateOff(): Promise<void>;
|
|
278
|
+
SetEmulatorPowerStateOn(): Promise<void>;
|
|
279
|
+
WifiSwitchOff(): Promise<void>;
|
|
280
|
+
WifiSwitchOn(): Promise<void>;
|
|
281
|
+
PressHomeKey(): Promise<void>;
|
|
282
|
+
TapOnSpecifiedLocation(value: string): Promise<void>;
|
|
283
|
+
OpenMobileApplication(value: string): Promise<void>;
|
|
284
|
+
IsAppInstalled(value: string): Promise<void>;
|
|
285
|
+
ReceiveMessageOnEmulator(value: string): Promise<void>;
|
|
286
|
+
UninstallAPK(value: string): Promise<void>;
|
|
287
|
+
InstallAPK(value: string): Promise<void>;
|
|
288
|
+
TerminateAppUsingAppPackage(value: string): Promise<void>;
|
|
289
|
+
OpenAppWithApkFilePath(value: string): Promise<void>;
|
|
290
|
+
ActivateAppUsingAppPackage(value: string): Promise<void>;
|
|
291
|
+
LongPress(selector: string, value: string, elementName: string, elementType: string): Promise<void>;
|
|
263
292
|
}
|
|
@@ -237,6 +237,35 @@ import { verifyBestPracticesScore } from "./interaction/verify/VerifyBestPractic
|
|
|
237
237
|
import { verifySeoScore } from "./interaction/verify/VerifySeoScore.js";
|
|
238
238
|
import { verifyPwaScore } from "./interaction/verify/VerifyPwaScore.js";
|
|
239
239
|
import { verifyHexCodeForGivenXYCoordinates } from "./interaction/verify/VerifyHexCodeForGivenXYCoordinates.js";
|
|
240
|
+
import { AirplaneModeSwitchOff } from "./interaction/inputlessActions/AirplaneModeSwitchOff.js";
|
|
241
|
+
import { AirplaneModeSwitchOn } from "./interaction/inputlessActions/AirplaneModeSwitchOn.js";
|
|
242
|
+
import { Break } from "./interaction/inputlessActions/Break.js";
|
|
243
|
+
import { Continue } from "./interaction/inputlessActions/Continue.js";
|
|
244
|
+
import { GpsSwitchOff } from "./interaction/inputlessActions/GpsSwitchOff.js";
|
|
245
|
+
import { GpsSwitchOn } from "./interaction/inputlessActions/GpsSwitchOn.js";
|
|
246
|
+
import { HideKeyboard } from "./interaction/inputlessActions/HideKeyboard.js";
|
|
247
|
+
import { LockDevice } from "./interaction/inputlessActions/LockDevice.js";
|
|
248
|
+
import { OpenChromeBrowser } from "./interaction/inputlessActions/OpenChromeBrowser.js";
|
|
249
|
+
import { OpenNotification } from "./interaction/inputlessActions/OpenNotification.js";
|
|
250
|
+
import { ResetApp } from "./interaction/inputlessActions/ResetApp.js";
|
|
251
|
+
import { RestartCurrentDevice } from "./interaction/inputlessActions/RestartCurrentDevice.js";
|
|
252
|
+
import { SetDeviceOrientationAsLandscape } from "./interaction/inputlessActions/SetDeviceOrientationAsLandscape.js";
|
|
253
|
+
import { SetDeviceOrientationAsPortrait } from "./interaction/inputlessActions/SetDeviceOrientationAsPortrait.js";
|
|
254
|
+
import { SetEmulatorPowerStateOff } from "./interaction/inputlessActions/SetEmulatorPowerStateOff.js";
|
|
255
|
+
import { SetEmulatorPowerStateOn } from "./interaction/inputlessActions/SetEmulatorPowerStateOn.js";
|
|
256
|
+
import { WifiSwitchOff } from "./interaction/inputlessActions/WifiSwitchOff.js";
|
|
257
|
+
import { WifiSwitchOn } from "./interaction/inputlessActions/WifiSwitchOn.js";
|
|
258
|
+
import { PressHomeKey } from "./interaction/press/pressHomeKey.js";
|
|
259
|
+
import { TapOnSpecifiedLocation } from "./interaction/click/tapOnSpecifiedLocation.js";
|
|
260
|
+
import { OpenMobileApplication } from "./interaction/elementlessActions/openMobileApplication.js";
|
|
261
|
+
import { IsAppInstalled } from "./interaction/elementlessActions/isAppInstalled.js";
|
|
262
|
+
import { ReceiveMessageOnEmulator } from "./interaction/elementlessActions/receiveMessageOnEmulator.js";
|
|
263
|
+
import { UninstallAPK } from "./interaction/elementlessActions/uninstallAPK.js";
|
|
264
|
+
import { InstallAPK } from "./interaction/elementlessActions/installAPK.js";
|
|
265
|
+
import { TerminateAppUsingAppPackage } from "./interaction/elementlessActions/terminateAppUsingAppPackage.js";
|
|
266
|
+
import { OpenAppWithApkFilePath } from "./interaction/elementlessActions/openAppWithApkFilePath.js";
|
|
267
|
+
import { ActivateAppUsingAppPackage } from "./interaction/elementlessActions/activateAppUsingAppPackage.js";
|
|
268
|
+
import { LongPress } from "./interaction/press/longPress.js";
|
|
240
269
|
import { pressBackKey } from "./interaction/press/mobPressBackKey.js";
|
|
241
270
|
import { waitTillPresenceOfElement } from "./interaction/wait/waitTillPresenceOfElement.js";
|
|
242
271
|
import { waitTillPresenceOfAllElements } from "./interaction/wait/waitTillPresenceOfAllElements.js";
|
|
@@ -4324,4 +4353,394 @@ export class ActionExecutor {
|
|
|
4324
4353
|
throw error;
|
|
4325
4354
|
}
|
|
4326
4355
|
}
|
|
4356
|
+
async OpenNotification() {
|
|
4357
|
+
try {
|
|
4358
|
+
await OpenNotification({
|
|
4359
|
+
driver: this.driver,
|
|
4360
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4361
|
+
platform: this.platform
|
|
4362
|
+
});
|
|
4363
|
+
}
|
|
4364
|
+
catch (error) {
|
|
4365
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4366
|
+
throw error;
|
|
4367
|
+
}
|
|
4368
|
+
}
|
|
4369
|
+
async AirplaneModeSwitchOff() {
|
|
4370
|
+
try {
|
|
4371
|
+
await AirplaneModeSwitchOff({
|
|
4372
|
+
driver: this.driver,
|
|
4373
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4374
|
+
platform: this.platform
|
|
4375
|
+
});
|
|
4376
|
+
}
|
|
4377
|
+
catch (error) {
|
|
4378
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4379
|
+
throw error;
|
|
4380
|
+
}
|
|
4381
|
+
}
|
|
4382
|
+
async AirplaneModeSwitchOn() {
|
|
4383
|
+
try {
|
|
4384
|
+
await AirplaneModeSwitchOn({
|
|
4385
|
+
driver: this.driver,
|
|
4386
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4387
|
+
platform: this.platform
|
|
4388
|
+
});
|
|
4389
|
+
}
|
|
4390
|
+
catch (error) {
|
|
4391
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4392
|
+
throw error;
|
|
4393
|
+
}
|
|
4394
|
+
}
|
|
4395
|
+
async Break() {
|
|
4396
|
+
try {
|
|
4397
|
+
await Break({
|
|
4398
|
+
driver: this.driver,
|
|
4399
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4400
|
+
platform: this.platform
|
|
4401
|
+
});
|
|
4402
|
+
}
|
|
4403
|
+
catch (error) {
|
|
4404
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4405
|
+
throw error;
|
|
4406
|
+
}
|
|
4407
|
+
}
|
|
4408
|
+
async Continue() {
|
|
4409
|
+
try {
|
|
4410
|
+
await Continue({
|
|
4411
|
+
driver: this.driver,
|
|
4412
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4413
|
+
platform: this.platform
|
|
4414
|
+
});
|
|
4415
|
+
}
|
|
4416
|
+
catch (error) {
|
|
4417
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4418
|
+
throw error;
|
|
4419
|
+
}
|
|
4420
|
+
}
|
|
4421
|
+
async GpsSwitchOff() {
|
|
4422
|
+
try {
|
|
4423
|
+
await GpsSwitchOff({
|
|
4424
|
+
driver: this.driver,
|
|
4425
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4426
|
+
platform: this.platform
|
|
4427
|
+
});
|
|
4428
|
+
}
|
|
4429
|
+
catch (error) {
|
|
4430
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4431
|
+
throw error;
|
|
4432
|
+
}
|
|
4433
|
+
}
|
|
4434
|
+
async GpsSwitchOn() {
|
|
4435
|
+
try {
|
|
4436
|
+
await GpsSwitchOn({
|
|
4437
|
+
driver: this.driver,
|
|
4438
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4439
|
+
platform: this.platform
|
|
4440
|
+
});
|
|
4441
|
+
}
|
|
4442
|
+
catch (error) {
|
|
4443
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4444
|
+
throw error;
|
|
4445
|
+
}
|
|
4446
|
+
}
|
|
4447
|
+
async HideKeyboard() {
|
|
4448
|
+
try {
|
|
4449
|
+
await HideKeyboard({
|
|
4450
|
+
driver: this.driver,
|
|
4451
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4452
|
+
platform: this.platform
|
|
4453
|
+
});
|
|
4454
|
+
}
|
|
4455
|
+
catch (error) {
|
|
4456
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4457
|
+
throw error;
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4460
|
+
async LockDevice() {
|
|
4461
|
+
try {
|
|
4462
|
+
await LockDevice({
|
|
4463
|
+
driver: this.driver,
|
|
4464
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4465
|
+
platform: this.platform
|
|
4466
|
+
});
|
|
4467
|
+
}
|
|
4468
|
+
catch (error) {
|
|
4469
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4470
|
+
throw error;
|
|
4471
|
+
}
|
|
4472
|
+
}
|
|
4473
|
+
async OpenChromeBrowser() {
|
|
4474
|
+
try {
|
|
4475
|
+
await OpenChromeBrowser({
|
|
4476
|
+
driver: this.driver,
|
|
4477
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4478
|
+
platform: this.platform
|
|
4479
|
+
});
|
|
4480
|
+
}
|
|
4481
|
+
catch (error) {
|
|
4482
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4483
|
+
throw error;
|
|
4484
|
+
}
|
|
4485
|
+
}
|
|
4486
|
+
async ResetApp() {
|
|
4487
|
+
try {
|
|
4488
|
+
await ResetApp({
|
|
4489
|
+
driver: this.driver,
|
|
4490
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4491
|
+
platform: this.platform
|
|
4492
|
+
});
|
|
4493
|
+
}
|
|
4494
|
+
catch (error) {
|
|
4495
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4496
|
+
throw error;
|
|
4497
|
+
}
|
|
4498
|
+
}
|
|
4499
|
+
async RestartCurrentDevice() {
|
|
4500
|
+
try {
|
|
4501
|
+
await RestartCurrentDevice({
|
|
4502
|
+
driver: this.driver,
|
|
4503
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4504
|
+
platform: this.platform
|
|
4505
|
+
});
|
|
4506
|
+
}
|
|
4507
|
+
catch (error) {
|
|
4508
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4509
|
+
throw error;
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4512
|
+
async SetDeviceOrientationAsLandscape() {
|
|
4513
|
+
try {
|
|
4514
|
+
await SetDeviceOrientationAsLandscape({
|
|
4515
|
+
driver: this.driver,
|
|
4516
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4517
|
+
platform: this.platform
|
|
4518
|
+
});
|
|
4519
|
+
}
|
|
4520
|
+
catch (error) {
|
|
4521
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4522
|
+
throw error;
|
|
4523
|
+
}
|
|
4524
|
+
}
|
|
4525
|
+
async SetDeviceOrientationAsPortrait() {
|
|
4526
|
+
try {
|
|
4527
|
+
await SetDeviceOrientationAsPortrait({
|
|
4528
|
+
driver: this.driver,
|
|
4529
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4530
|
+
platform: this.platform
|
|
4531
|
+
});
|
|
4532
|
+
}
|
|
4533
|
+
catch (error) {
|
|
4534
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4535
|
+
throw error;
|
|
4536
|
+
}
|
|
4537
|
+
}
|
|
4538
|
+
async SetEmulatorPowerStateOff() {
|
|
4539
|
+
try {
|
|
4540
|
+
await SetEmulatorPowerStateOff({
|
|
4541
|
+
driver: this.driver,
|
|
4542
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4543
|
+
platform: this.platform
|
|
4544
|
+
});
|
|
4545
|
+
}
|
|
4546
|
+
catch (error) {
|
|
4547
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4548
|
+
throw error;
|
|
4549
|
+
}
|
|
4550
|
+
}
|
|
4551
|
+
async SetEmulatorPowerStateOn() {
|
|
4552
|
+
try {
|
|
4553
|
+
await SetEmulatorPowerStateOn({
|
|
4554
|
+
driver: this.driver,
|
|
4555
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4556
|
+
platform: this.platform
|
|
4557
|
+
});
|
|
4558
|
+
}
|
|
4559
|
+
catch (error) {
|
|
4560
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4561
|
+
throw error;
|
|
4562
|
+
}
|
|
4563
|
+
}
|
|
4564
|
+
async WifiSwitchOff() {
|
|
4565
|
+
try {
|
|
4566
|
+
await WifiSwitchOff({
|
|
4567
|
+
driver: this.driver,
|
|
4568
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4569
|
+
platform: this.platform
|
|
4570
|
+
});
|
|
4571
|
+
}
|
|
4572
|
+
catch (error) {
|
|
4573
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4574
|
+
throw error;
|
|
4575
|
+
}
|
|
4576
|
+
}
|
|
4577
|
+
async WifiSwitchOn() {
|
|
4578
|
+
try {
|
|
4579
|
+
await WifiSwitchOn({
|
|
4580
|
+
driver: this.driver,
|
|
4581
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4582
|
+
platform: this.platform
|
|
4583
|
+
});
|
|
4584
|
+
}
|
|
4585
|
+
catch (error) {
|
|
4586
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4587
|
+
throw error;
|
|
4588
|
+
}
|
|
4589
|
+
}
|
|
4590
|
+
async PressHomeKey() {
|
|
4591
|
+
try {
|
|
4592
|
+
await PressHomeKey({
|
|
4593
|
+
driver: this.driver,
|
|
4594
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4595
|
+
platform: this.platform
|
|
4596
|
+
});
|
|
4597
|
+
}
|
|
4598
|
+
catch (error) {
|
|
4599
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4600
|
+
throw error;
|
|
4601
|
+
}
|
|
4602
|
+
}
|
|
4603
|
+
async TapOnSpecifiedLocation(value) {
|
|
4604
|
+
try {
|
|
4605
|
+
await TapOnSpecifiedLocation({
|
|
4606
|
+
driver: this.driver,
|
|
4607
|
+
value,
|
|
4608
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4609
|
+
platform: this.platform
|
|
4610
|
+
});
|
|
4611
|
+
}
|
|
4612
|
+
catch (error) {
|
|
4613
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4614
|
+
throw error;
|
|
4615
|
+
}
|
|
4616
|
+
}
|
|
4617
|
+
async OpenMobileApplication(value) {
|
|
4618
|
+
try {
|
|
4619
|
+
await OpenMobileApplication({
|
|
4620
|
+
driver: this.driver,
|
|
4621
|
+
value,
|
|
4622
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4623
|
+
platform: this.platform
|
|
4624
|
+
});
|
|
4625
|
+
}
|
|
4626
|
+
catch (error) {
|
|
4627
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4628
|
+
throw error;
|
|
4629
|
+
}
|
|
4630
|
+
}
|
|
4631
|
+
async IsAppInstalled(value) {
|
|
4632
|
+
try {
|
|
4633
|
+
await IsAppInstalled({
|
|
4634
|
+
driver: this.driver,
|
|
4635
|
+
value,
|
|
4636
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4637
|
+
platform: this.platform
|
|
4638
|
+
});
|
|
4639
|
+
}
|
|
4640
|
+
catch (error) {
|
|
4641
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4642
|
+
throw error;
|
|
4643
|
+
}
|
|
4644
|
+
}
|
|
4645
|
+
async ReceiveMessageOnEmulator(value) {
|
|
4646
|
+
try {
|
|
4647
|
+
await ReceiveMessageOnEmulator({
|
|
4648
|
+
driver: this.driver,
|
|
4649
|
+
value,
|
|
4650
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4651
|
+
platform: this.platform
|
|
4652
|
+
});
|
|
4653
|
+
}
|
|
4654
|
+
catch (error) {
|
|
4655
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4656
|
+
throw error;
|
|
4657
|
+
}
|
|
4658
|
+
}
|
|
4659
|
+
async UninstallAPK(value) {
|
|
4660
|
+
try {
|
|
4661
|
+
await UninstallAPK({
|
|
4662
|
+
driver: this.driver,
|
|
4663
|
+
value,
|
|
4664
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4665
|
+
platform: this.platform
|
|
4666
|
+
});
|
|
4667
|
+
}
|
|
4668
|
+
catch (error) {
|
|
4669
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4670
|
+
throw error;
|
|
4671
|
+
}
|
|
4672
|
+
}
|
|
4673
|
+
async InstallAPK(value) {
|
|
4674
|
+
try {
|
|
4675
|
+
await InstallAPK({
|
|
4676
|
+
driver: this.driver,
|
|
4677
|
+
value,
|
|
4678
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4679
|
+
platform: this.platform
|
|
4680
|
+
});
|
|
4681
|
+
}
|
|
4682
|
+
catch (error) {
|
|
4683
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4684
|
+
throw error;
|
|
4685
|
+
}
|
|
4686
|
+
}
|
|
4687
|
+
async TerminateAppUsingAppPackage(value) {
|
|
4688
|
+
try {
|
|
4689
|
+
await TerminateAppUsingAppPackage({
|
|
4690
|
+
driver: this.driver,
|
|
4691
|
+
value,
|
|
4692
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4693
|
+
platform: this.platform
|
|
4694
|
+
});
|
|
4695
|
+
}
|
|
4696
|
+
catch (error) {
|
|
4697
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4698
|
+
throw error;
|
|
4699
|
+
}
|
|
4700
|
+
}
|
|
4701
|
+
async OpenAppWithApkFilePath(value) {
|
|
4702
|
+
try {
|
|
4703
|
+
await OpenAppWithApkFilePath({
|
|
4704
|
+
driver: this.driver,
|
|
4705
|
+
value,
|
|
4706
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4707
|
+
platform: this.platform
|
|
4708
|
+
});
|
|
4709
|
+
}
|
|
4710
|
+
catch (error) {
|
|
4711
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4712
|
+
throw error;
|
|
4713
|
+
}
|
|
4714
|
+
}
|
|
4715
|
+
async ActivateAppUsingAppPackage(value) {
|
|
4716
|
+
try {
|
|
4717
|
+
await ActivateAppUsingAppPackage({
|
|
4718
|
+
driver: this.driver,
|
|
4719
|
+
value,
|
|
4720
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4721
|
+
platform: this.platform
|
|
4722
|
+
});
|
|
4723
|
+
}
|
|
4724
|
+
catch (error) {
|
|
4725
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4726
|
+
throw error;
|
|
4727
|
+
}
|
|
4728
|
+
}
|
|
4729
|
+
async LongPress(selector, value, elementName, elementType) {
|
|
4730
|
+
try {
|
|
4731
|
+
await LongPress({
|
|
4732
|
+
driver: this.driver,
|
|
4733
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
4734
|
+
platform: this.platform,
|
|
4735
|
+
selector,
|
|
4736
|
+
value,
|
|
4737
|
+
elementName,
|
|
4738
|
+
elementType
|
|
4739
|
+
});
|
|
4740
|
+
}
|
|
4741
|
+
catch (error) {
|
|
4742
|
+
logger.error("Error in [ActionExecutor]", error);
|
|
4743
|
+
throw error;
|
|
4744
|
+
}
|
|
4745
|
+
}
|
|
4327
4746
|
}
|
|
@@ -4,9 +4,9 @@ export async function doubleClick(args) {
|
|
|
4
4
|
try {
|
|
5
5
|
const element = await args.driver.$(args.selector);
|
|
6
6
|
await args.driver.touchAction([
|
|
7
|
-
{ action: 'tap', element },
|
|
7
|
+
{ action: 'tap', element: element },
|
|
8
8
|
{ action: 'wait', ms: 50 },
|
|
9
|
-
{ action: 'tap', element }
|
|
9
|
+
{ action: 'tap', element: element }
|
|
10
10
|
]);
|
|
11
11
|
args.scriptDataAppender.add(async () => {
|
|
12
12
|
return {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const TapOnSpecifiedLocation = async (args) => {
|
|
2
|
+
try {
|
|
3
|
+
const coords = args.value.split(",");
|
|
4
|
+
const x = parseInt(coords[0]);
|
|
5
|
+
const y = parseInt(coords[1]);
|
|
6
|
+
await args.driver.performActions([
|
|
7
|
+
{
|
|
8
|
+
type: "pointer",
|
|
9
|
+
id: "finger1",
|
|
10
|
+
parameters: { pointerType: "touch" },
|
|
11
|
+
actions: [
|
|
12
|
+
{ type: "pointerMove", duration: 0, x, y },
|
|
13
|
+
{ type: "pointerDown", button: 0 },
|
|
14
|
+
{ type: "pointerUp", button: 0 }
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
]);
|
|
18
|
+
await args.driver.releaseActions();
|
|
19
|
+
args.scriptDataAppender.add(async () => ({
|
|
20
|
+
nlpName: "MOB_TapOnSpecifiedLocation",
|
|
21
|
+
stepInputs: [x, y],
|
|
22
|
+
elementsData: []
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
args.scriptDataAppender.setErrorNLP("MOB_TapOnSpecifiedLocation");
|
|
27
|
+
throw new Error("MOB_TapOnSpecifiedLocation action failed", { cause: error });
|
|
28
|
+
}
|
|
29
|
+
};
|