ff-automationv2 2.2.32 → 2.2.33
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/llmPromptTypes/systemPromptTypes.d.ts +3 -0
- package/dist/ai/llmprompts/promptRegistry.js +4 -0
- package/dist/ai/llmprompts/systemPrompts/actionExtractorPrompt.js +16 -12
- package/dist/ai/llmprompts/systemPrompts/arithmeticPrompt.d.ts +2 -0
- package/dist/ai/llmprompts/systemPrompts/arithmeticPrompt.js +48 -0
- package/dist/ai/llmprompts/systemPrompts/getActionExtractorPrompt.js +1 -1
- package/dist/ai/llmprompts/systemPrompts/getActionExtractorPromptMob.js +1 -1
- package/dist/ai/llmprompts/systemPrompts/inputContextPrompt.js +2 -0
- package/dist/ai/llmprompts/systemPrompts/mobileKeywordExtractor.js +2 -2
- package/dist/ai/llmprompts/userPrompts/userPrompt.js +1 -0
- package/dist/automation/actions/executor.d.ts +1 -0
- package/dist/automation/actions/executor.js +25 -0
- package/dist/automation/actions/interaction/alert/enterDataToAlert.js +2 -2
- package/dist/automation/actions/interaction/alert/getTextPresentOnAlertPopup.js +2 -2
- package/dist/automation/actions/interaction/arithmetic/arithmeticOperations.d.ts +2 -0
- package/dist/automation/actions/interaction/arithmetic/arithmeticOperations.js +61 -0
- package/dist/automation/actions/interaction/clear/clearAndEnter.js +3 -3
- package/dist/automation/actions/interaction/elementlessActions/getOtp.js +5 -5
- package/dist/automation/actions/interaction/enterActions/EnterInputIntoElementFromClipBoardInterface_mob.js +2 -2
- package/dist/automation/actions/interaction/enterActions/enterInput.js +3 -3
- package/dist/automation/actions/interaction/enterActions/enterInputAndPress.js +3 -3
- package/dist/automation/actions/interaction/enterActions/enterUrl.js +3 -3
- package/dist/automation/actions/interaction/enterActions/enterusingJs.js +2 -2
- package/dist/automation/actions/interaction/enterActions/waitAndEnter.js +3 -3
- package/dist/automation/actions/interaction/get/MOB_GetADBLogsForGivenAppPackage.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetAllContexts.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetAllWindowHandles.js +3 -3
- package/dist/automation/actions/interaction/get/MOB_GetAltitude.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetBatteryPercentage.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetBatteryStatus.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetClipBoardText.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentActivity.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentAppPackage.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentContext.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceDate.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceSettings.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceStatus.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceSystemBars.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceTime.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentOrientation.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentSessionId.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetDeviceLocation.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetDeviceName.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetDeviceOsVersion.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetDeviceUdid.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetHeightOfElement.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetHeightOfScreen.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetHourFromCurrentDeviceTime.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetLatitude.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetLongitude.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetMinuteFromCurrentDeviceTime.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetSecondFromCurrentDeviceTime.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetSizeOfScreen.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetSupportedPerformanceDataTypes.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetTextFromElementAndSetToClipBoard.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetWidthOfElement.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetWidthOfScreen.js +2 -2
- package/dist/automation/actions/interaction/get/browserWindowGetPosition.js +2 -2
- package/dist/automation/actions/interaction/get/getAllBrokenImages.js +2 -2
- package/dist/automation/actions/interaction/get/getAllBrokenLinkCount.js +2 -2
- package/dist/automation/actions/interaction/get/getAllBrokenLinks.js +2 -2
- package/dist/automation/actions/interaction/get/getAllConsoleErrors.js +2 -2
- package/dist/automation/actions/interaction/get/getAllConsoleInformation.js +2 -2
- package/dist/automation/actions/interaction/get/getAllConsoleLogs.js +2 -2
- package/dist/automation/actions/interaction/get/getAllConsoleWarnings.js +2 -2
- package/dist/automation/actions/interaction/get/getAllCookieNames.js +2 -2
- package/dist/automation/actions/interaction/get/getAllCookieValues.js +2 -2
- package/dist/automation/actions/interaction/get/getAllSelectedOptions.js +2 -2
- package/dist/automation/actions/interaction/get/getAllTheOptionsFromListBoxAsText.js +2 -2
- package/dist/automation/actions/interaction/get/getAllTheOptionsFromListBoxAsTextInSortedOrder.js +2 -2
- package/dist/automation/actions/interaction/get/getAllTheSelectedOptionsFromListBoxAsText.js +2 -2
- package/dist/automation/actions/interaction/get/getAllWindowHandles.js +2 -2
- package/dist/automation/actions/interaction/get/getAttribute.js +3 -3
- package/dist/automation/actions/interaction/get/getAudioCurrentPlaybackRate.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioCurrentSeekTime.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioCurrentVolume.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioDecodedByte.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioDefaultPlaybackRate.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioMediaLength.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioMediaSource.js +2 -2
- package/dist/automation/actions/interaction/get/getBestPracticesScore.js +2 -2
- package/dist/automation/actions/interaction/get/getBrowserCount.js +2 -2
- package/dist/automation/actions/interaction/get/getBrowserVersion.js +2 -2
- package/dist/automation/actions/interaction/get/getCapabilityNames.js +2 -2
- package/dist/automation/actions/interaction/get/getClipBoardText.js +2 -2
- package/dist/automation/actions/interaction/get/getCollectiveApiResponseTime.js +2 -2
- package/dist/automation/actions/interaction/get/getCollectiveApiStatusCode.js +2 -2
- package/dist/automation/actions/interaction/get/getCssValue.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentDayOfTheWeek.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSecondsFromCurrentSystemTime.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemDate.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemDay.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemMonth.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemTime.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemYear.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentWindowHandle.js +2 -2
- package/dist/automation/actions/interaction/get/getDataFromApiRequestHeaderForJsonPath.js +2 -2
- package/dist/automation/actions/interaction/get/getDataFromApiResponseForJsonPath.js +2 -2
- package/dist/automation/actions/interaction/get/getDateWithGivenFormat.js +2 -2
- package/dist/automation/actions/interaction/get/getDriverInstance.js +2 -2
- package/dist/automation/actions/interaction/get/getFirstContentfulPaint.js +2 -2
- package/dist/automation/actions/interaction/get/getFirstSelectedOption.js +2 -2
- package/dist/automation/actions/interaction/get/getFullPaintTime.js +2 -2
- package/dist/automation/actions/interaction/get/getHTMLCodeOfPage.js +2 -2
- package/dist/automation/actions/interaction/get/getHeightOfBrowserWindow.js +2 -2
- package/dist/automation/actions/interaction/get/getHeightOfWebElement.js +2 -2
- package/dist/automation/actions/interaction/get/getHourFromCurrentSystemTime.js +2 -2
- package/dist/automation/actions/interaction/get/getImplicitTimeOut.js +2 -2
- package/dist/automation/actions/interaction/get/getLargestContentfulPaint.js +2 -2
- package/dist/automation/actions/interaction/get/getListBoxSize.js +2 -2
- package/dist/automation/actions/interaction/get/getListOfElementsFromLocatorTypeLocatorValue.js +3 -3
- package/dist/automation/actions/interaction/get/getLocation.js +3 -3
- package/dist/automation/actions/interaction/get/getMinuteFromCurrentSystemTime.js +2 -2
- package/dist/automation/actions/interaction/get/getNetworkRouteTime.js +2 -2
- package/dist/automation/actions/interaction/get/getNumberOfBrokenImages.js +2 -2
- package/dist/automation/actions/interaction/get/getNumberOfLinksPresentInCurrentPage.js +2 -2
- package/dist/automation/actions/interaction/get/getNumberOfWorkingLinksFromCurrentPage.js +2 -2
- package/dist/automation/actions/interaction/get/getOptions.js +2 -2
- package/dist/automation/actions/interaction/get/getPageTitle.js +2 -2
- package/dist/automation/actions/interaction/get/getPerformanceMetrics.js +2 -2
- package/dist/automation/actions/interaction/get/getPwaScore.js +2 -2
- package/dist/automation/actions/interaction/get/getRect.js +3 -3
- package/dist/automation/actions/interaction/get/getScreenshot.js +2 -2
- package/dist/automation/actions/interaction/get/getScreenshotAs.js +2 -2
- package/dist/automation/actions/interaction/get/getSeoScore.js +2 -2
- package/dist/automation/actions/interaction/get/getSingleApiRequestPayload.js +2 -2
- package/dist/automation/actions/interaction/get/getSingleApiResponse.js +2 -2
- package/dist/automation/actions/interaction/get/getSingleApiResponseTime.js +2 -2
- package/dist/automation/actions/interaction/get/getSingleApiStatusCode.js +2 -2
- package/dist/automation/actions/interaction/get/getSize.js +3 -3
- package/dist/automation/actions/interaction/get/getSizeOfBrowserWindow.js +2 -2
- package/dist/automation/actions/interaction/get/getStringDataFromLocalFile.js +2 -2
- package/dist/automation/actions/interaction/get/getSystemProperty.js +2 -2
- package/dist/automation/actions/interaction/get/getTagName.js +3 -3
- package/dist/automation/actions/interaction/get/getText.js +3 -3
- package/dist/automation/actions/interaction/get/getTheFirstSelectedOptionFromListBoxAsText.js +2 -2
- package/dist/automation/actions/interaction/get/getTotalNumberOfCookies.js +2 -2
- package/dist/automation/actions/interaction/get/getTunnelIdentifier.js +2 -2
- package/dist/automation/actions/interaction/get/getURLPresentInAddressBar.js +2 -2
- package/dist/automation/actions/interaction/get/getUserHomeDirectory.js +2 -2
- package/dist/automation/actions/interaction/get/getValueByCookieName.js +2 -2
- package/dist/automation/actions/interaction/get/getValueFromLocalStorage.js +2 -2
- package/dist/automation/actions/interaction/get/getValueOfSystemVariable.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoCurrentPlaybackRate.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoCurrentSeekTime.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoCurrentVolume.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoDecodedByte.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoDefaultPlaybackRate.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoMediaLength.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoMediaSource.js +2 -2
- package/dist/automation/actions/interaction/get/getWidthOfBrowser.js +2 -2
- package/dist/automation/actions/interaction/get/getWidthOfWebElement.js +2 -2
- package/dist/automation/actions/interaction/get/getWorkingLinksFromCurrentPage.js +2 -2
- package/dist/automation/actions/interaction/get/getWrappedElement.js +2 -2
- package/dist/automation/actions/interaction/get/getWrappedOptionFromListBoxAsText.js +2 -2
- package/dist/automation/actions/interaction/get/getXLocationOfBrowserWindow.js +2 -2
- package/dist/automation/actions/interaction/get/getXLocationOfWebElement.js +3 -3
- package/dist/automation/actions/interaction/get/getYLocationOfBrowserWindow.js +2 -2
- package/dist/automation/actions/interaction/get/getYLocationOfWebElement.js +3 -3
- package/dist/automation/actions/interaction/shadowDom/shadowDomEnter.js +2 -2
- package/dist/automation/actions/interaction/shadowDom/shadowDomGetText.js +2 -2
- package/dist/automation/actions/interface/FireFlinkResponseSchema.d.ts +13 -0
- package/dist/automation/actions/interface/FireFlinkResponseSchema.js +10 -1
- package/dist/automation/actions/interface/arithmeticActionInterface.d.ts +18 -0
- package/dist/automation/actions/interface/arithmeticActionInterface.js +2 -0
- package/dist/core/constants/allAction.js +2 -1
- package/dist/core/constants/supportedActions.js +2 -1
- package/dist/core/interfaces/actionInterface.d.ts +2 -0
- package/dist/core/interfaces/promptInterface.d.ts +3 -0
- package/dist/core/main/actionHandlerFactory.js +3 -0
- package/dist/core/main/runAutomationScript.js +40 -5
- package/dist/core/types/promptType.d.ts +2 -1
- package/dist/core/types/promptType.js +1 -0
- package/package.json +1 -1
- /package/dist/utils/helpers/{getHelper.d.ts → saveStepInputData.d.ts} +0 -0
- /package/dist/utils/helpers/{getHelper.js → saveStepInputData.js} +0 -0
|
@@ -20,6 +20,7 @@ const inputContextPrompt_js_1 = require("./systemPrompts/inputContextPrompt.js")
|
|
|
20
20
|
// import { combinedActionExtractorPrompt } from "./systemPrompts/combinedActionExtractorPrompt.js";
|
|
21
21
|
const otpExtractorPrompt_js_1 = require("./systemPrompts/otpExtractorPrompt.js");
|
|
22
22
|
const fileVerifyActionExtractorPrompt_js_1 = require("./systemPrompts/fileVerifyActionExtractorPrompt.js");
|
|
23
|
+
const arithmeticPrompt_js_1 = require("./systemPrompts/arithmeticPrompt.js");
|
|
23
24
|
exports.prompts = {
|
|
24
25
|
web: {
|
|
25
26
|
userStoryToList: userStoryToListPrompt_js_1.buildStepExtractionPrompt,
|
|
@@ -34,6 +35,7 @@ exports.prompts = {
|
|
|
34
35
|
inputContextPrompt: inputContextPrompt_js_1.inputContextPrompt,
|
|
35
36
|
otpExtractorPrompt: otpExtractorPrompt_js_1.otpExtractorPrompt,
|
|
36
37
|
fileVerifyActionExtractorPrompt: fileVerifyActionExtractorPrompt_js_1.fileVerifyActionExtractorPrompt,
|
|
38
|
+
arithmeticPrompt: arithmeticPrompt_js_1.arithmeticPrompt,
|
|
37
39
|
},
|
|
38
40
|
android: {
|
|
39
41
|
userStoryToList: userStoryToListPrompt_js_1.androidbuildStepExtractionPrompt,
|
|
@@ -48,6 +50,7 @@ exports.prompts = {
|
|
|
48
50
|
inputContextPrompt: inputContextPrompt_js_1.inputContextPrompt,
|
|
49
51
|
otpExtractorPrompt: otpExtractorPrompt_js_1.otpExtractorPrompt,
|
|
50
52
|
fileVerifyActionExtractorPrompt: fileVerifyActionExtractorPrompt_js_1.fileVerifyActionExtractorPrompt,
|
|
53
|
+
arithmeticPrompt: arithmeticPrompt_js_1.arithmeticPrompt,
|
|
51
54
|
},
|
|
52
55
|
ios: {
|
|
53
56
|
userStoryToList: userStoryToListPrompt_js_1.androidbuildStepExtractionPrompt,
|
|
@@ -62,5 +65,6 @@ exports.prompts = {
|
|
|
62
65
|
inputContextPrompt: inputContextPrompt_js_1.inputContextPrompt,
|
|
63
66
|
otpExtractorPrompt: otpExtractorPrompt_js_1.otpExtractorPrompt,
|
|
64
67
|
fileVerifyActionExtractorPrompt: fileVerifyActionExtractorPrompt_js_1.fileVerifyActionExtractorPrompt,
|
|
68
|
+
arithmeticPrompt: arithmeticPrompt_js_1.arithmeticPrompt,
|
|
65
69
|
}
|
|
66
70
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.keywordExtractor = keywordExtractor;
|
|
4
4
|
async function keywordExtractor({ priorAndNextSteps }) {
|
|
5
|
-
const allowedActions = ["enter", "refresh", "wait", "verify", "scroll", "navigate", "navigateBack", "click", "maximize", "minimize", "get", "upload", "close", "open", "drag_and_drop", "switch", "cleartext", "notwebopenaction", "mouseAction", "switchToAndroid", "getOtp"];
|
|
5
|
+
const allowedActions = ["enter", "refresh", "wait", "verify", "scroll", "navigate", "navigateBack", "click", "maximize", "minimize", "get", "upload", "close", "open", "drag_and_drop", "switch", "cleartext", "notwebopenaction", "mouseAction", "switchToAndroid", "getOtp", "arithmetic"];
|
|
6
6
|
const prompt = `
|
|
7
7
|
You are an expert in Web application testing.
|
|
8
8
|
From the step, extract ONLY the meaningful keywords so that i can search for the element in the dom.
|
|
@@ -20,7 +20,10 @@ You are an expert in Web application testing.
|
|
|
20
20
|
No type word in the step → only [name] as the keyword.
|
|
21
21
|
Example: "click X filter dropdown" → ["X", "X filter", "X filter dropdown"]
|
|
22
22
|
If more than 3 type words are attached to the element (chain would exceed 5 keywords), keep the core name plus only the 2-3 type words CLOSEST to the element name and drop the rest, so total keywords stay within the 3-5 max.
|
|
23
|
-
- When a step contains two elements connected by a positional or relational phrase, keywords MUST contain at least one keyword from each element — TARGET element first, then the reference element. Never omit the reference element.
|
|
23
|
+
- When a step contains two elements connected by a positional or relational phrase, keywords MUST contain at least one keyword from each element — TARGET element first, then the reference element. Never omit the reference element. This includes positional connectors (above, below, next to, under, near) AND possessive/associative connectors (of, for) that link an attribute/property element to a named reference element. Do NOT merge the two elements into a single combined keyword string.
|
|
24
|
+
Example: "Click on x above y" → x is the target, y is the reference → ["x", "y"].
|
|
25
|
+
Example: "get Price of Learn Selenium" → Price is the target attribute, "Learn Selenium" is the reference element → keywords ["Price", "Learn Selenium"], elementName "Price".
|
|
26
|
+
Example: "verify Rating for Learn Selenium is 300" → ["Rating", "Learn Selenium"], elementName "Rating".
|
|
24
27
|
- 3 to 5 keywords maximum. dont give more then 5 keywords. and no need for case sensitive.
|
|
25
28
|
- General ordering rule: whenever a step involves both a target element and a reference/context element, the TARGET element's keyword(s) must always come FIRST, followed by the reference/context element's keyword(s). This applies to positional/relational steps, selection steps, and any other multi-element step.
|
|
26
29
|
- For the open action if they are not provided anything like profile, capablities in the step in that case don't add them check whether the profile and the capablities are present in the step if not please don't add them.
|
|
@@ -49,7 +52,7 @@ You are an expert in Web application testing.
|
|
|
49
52
|
- If the step is about entering text or Uploading file, Should NOT include input value from the step into keywords.
|
|
50
53
|
- If the step has words like tag name audio, video, image,svg, checkbox etc, include them in the keywords.
|
|
51
54
|
- **If icon is mentioned in step then 'svg' should add in keywords ex: click on x icon -> [x, x icon,svg] and for Upload action first keyword should be 'file'. ex: upload file in x -> [file,x].**
|
|
52
|
-
- Do NOT split single-word keywords and do NOT include relation terms (above, below, next to, etc.) in keywords.
|
|
55
|
+
- Do NOT split single-word keywords and do NOT include relation terms (above, below, next to, of, for, etc.) in keywords.
|
|
53
56
|
- Treat each keyword independently never merge different keywords.
|
|
54
57
|
- Keywords can be string or number if the step contains a number as part of the ELEMENT's name/label (e.g. "click on Step 2 tab" -> "Step 2" is a keyword). This does NOT apply to numbers that are the value being entered/typed/uploaded — those stay excluded per the "entering text or Uploading file" rule below, even if numeric (e.g. "Enter 5 in Quantity field" -> "5" is NOT a keyword).
|
|
55
58
|
- Do Not include any other unrelated keywords for step.
|
|
@@ -58,7 +61,7 @@ You are an expert in Web application testing.
|
|
|
58
61
|
- If the step is for the switching to android then provide the action as the switchToAndroid
|
|
59
62
|
- element_name: extract name of the element that mentioned in the the step.(eg:tap on x -> element_name:x) keep element_name as short as possible and make the first letter of first word of the element_name as capital. because element_name is also used to find element in the dom. and if element_name is not mentioned in step then return action of the step as element_name.
|
|
60
63
|
- Set action to notwebopenaction only when the instruction is related to a mobile application, app, application, installed package, or bundle .
|
|
61
|
-
- action: click for taping, clicking or selecting, enter for entering input, wait for waiting or sleeping,scroll for scrolling and swiping, navigate for navigating to page using url, navigateBack for navigateing back to previous page, get for getting,fetching element,maximize for maximizing browser window, close for closing browser window,open for opening browser window, upload for uploading file using path, drag_and_drop for dragging and dropping element, switch is for switching to tab or window or frame,cleartext for clearing or removing text from element, mouseAction for the action related mouse actions even for mouse click , refresh is for refreshing or reloading pages, getOtp for fetching/reading an OTP value.
|
|
64
|
+
- action: click for taping, clicking or selecting, enter for entering input, wait for waiting or sleeping,scroll for scrolling and swiping, navigate for navigating to page using url, navigateBack for navigateing back to previous page, get for getting,fetching,capturing,reading element or text,maximize for maximizing browser window, close for closing browser window,open for opening browser window, upload for uploading file using path, drag_and_drop for dragging and dropping element, switch is for switching to tab or window or frame,cleartext for clearing or removing text from element, mouseAction for the action related mouse actions even for mouse click , refresh is for refreshing or reloading pages, getOtp for fetching/reading an OTP value, arithmetic for performing arithmetic operations (multiply, divide, add, subtract, calculate).
|
|
62
65
|
- If mouse action related step is there select mouseAction from the allowed actions list check for the step and provide it.
|
|
63
66
|
- action must be one of from this list ${JSON.stringify(allowedActions)}.if not one of them, return '0'. if step about set or find action return '0'
|
|
64
67
|
- For navigate action, keywords should contain only one keyword which is full url from the step and should not include any other text. and if step has another actions, including navigate action, don't return navigate action return another action which is in the step. and element_name should be "URL".
|
|
@@ -92,7 +95,7 @@ You are an expert in Web application testing.
|
|
|
92
95
|
"keywords": ["key1", "key2"],
|
|
93
96
|
"elementName": "element name",
|
|
94
97
|
"action": ${allowedActions.join("|")},
|
|
95
|
-
"isStepValueDependable": boolean
|
|
98
|
+
"isStepValueDependable": boolean,
|
|
96
99
|
"liveLog": "Should Generate a short, human-readable description of what the AI is about to do.",
|
|
97
100
|
"fileType": "pdf" | other lowercase file extension | null,
|
|
98
101
|
"step": Return the original step exactly as-is if it contains a single action; if multiple actions exist, split into atomic steps without changing any wording, spelling, casing, spacing, or punctuation.(Rules: No rephrasing, no additions/removals—each output step must be an exact substring of the input.)
|
|
@@ -104,13 +107,14 @@ You are an expert in Web application testing.
|
|
|
104
107
|
STEP RULES (VERY IMPORTANT):
|
|
105
108
|
|
|
106
109
|
- Each "step" MUST represent EXACTLY ONE action.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
** isStepValueDependable (boolean):
|
|
111
|
+
• Set true when action is 'verify' or 'enter' and the step contains a value, comparison value, or referenced subject that represents data from another step, calculated result, or a referenced element/variable. Any explicit or implicit reference to existing, extracted, fetched, retrieved, copied, entered, calculated, or relationally referenced data must be treated as dependable (e.g., "enter calculated final result", "verify calculated value", "enter atpValue in field"). Resolve the reference using priorAndNextSteps when applicable; never consider future steps.
|
|
112
|
+
• Set true when action is 'arithmetic' and the step depends on values or variables from earlier steps (e.g., "Multiply atpValue by 3", "Subtract atpdivValue from atpValue", "Store captured value in variable atpValue").
|
|
113
|
+
• Set false only when the action has no reference to existing or earlier step data.
|
|
114
|
+
• Example: "verify extracted x text is x" → true when "extracted x text" refers to previously obtained data.
|
|
115
|
+
• Example: "enter that value in x" → true when "that value" refers to previously obtained data.
|
|
116
|
+
• Example: "Multiply atpValue by 3" → true when "atpValue" refers to a value captured in an earlier step.
|
|
117
|
+
|
|
114
118
|
- Step MUST be rewritten as a CLEAN and COMPLETE instruction.
|
|
115
119
|
- Step MUST contain:
|
|
116
120
|
• action
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.arithmeticPrompt = arithmeticPrompt;
|
|
4
|
+
async function arithmeticPrompt({ inputStepsContext, }) {
|
|
5
|
+
const arithmetic = ["multiply", "divide", "add", "subtract"];
|
|
6
|
+
const prompt = `
|
|
7
|
+
You are an intelligent assistant that extracts arithmetic operations and operands from test steps.
|
|
8
|
+
|
|
9
|
+
Previous steps data:
|
|
10
|
+
${JSON.stringify(inputStepsContext, null, 2)}
|
|
11
|
+
|
|
12
|
+
Instructions:
|
|
13
|
+
1. Analyze the current step and use Previous steps data to resolve any operand that refers to data from an earlier step.
|
|
14
|
+
2. Extract exactly two operands, their corresponding variable names when available, the arithmetic operation, and the target variable name.
|
|
15
|
+
|
|
16
|
+
Rules for "operation":
|
|
17
|
+
- Return ONLY one of: "multiply", "divide", "add", "subtract".
|
|
18
|
+
- Determine the operation directly from the current step.
|
|
19
|
+
|
|
20
|
+
Rules for "operandOne" and "operandTwo":
|
|
21
|
+
- If an operand is a literal number, return only the numeric value as a string.Remove currency symbols, special characters, commas, or other non - numeric symbols.Example: "$2" -> "2".
|
|
22
|
+
- If an operand refers to an earlier step or its value using contextual or relational wording, find the matching step in Previous steps data and use that step's inputText/value as the operand and its variableName as the corresponding operandVariableName.
|
|
23
|
+
- If the referenced earlier step contains both inputText and variableName, always use the inputText for the operand and the exact variableName for its operandVariableName.
|
|
24
|
+
- If an operand is a variable already present in Previous steps data, use its exact variableName.
|
|
25
|
+
- If no variableName exists for a literal operand, set its operandVariableName to null.
|
|
26
|
+
- Do not include symbols, descriptions, element names, or explanations in operandOne or operandTwo.
|
|
27
|
+
|
|
28
|
+
Rules for "subtract":
|
|
29
|
+
- "Subtract X from Y" -> operandOne = Y, operandTwo = X.
|
|
30
|
+
- For other subtraction wording, follow the operand order expressed by the step.
|
|
31
|
+
|
|
32
|
+
Rules for "variableName":
|
|
33
|
+
- If the current step explicitly provides a target variable name, use that exact name without modifying it.
|
|
34
|
+
- Otherwise, generate a valid descriptive variable name based on the operation and result.
|
|
35
|
+
- The generated name must contain only letters, digits, or underscores and must not start with a digit.
|
|
36
|
+
|
|
37
|
+
Respond ONLY with valid JSON in this exact format:
|
|
38
|
+
{
|
|
39
|
+
"operandOne": "x",
|
|
40
|
+
"operandTwo": "y",
|
|
41
|
+
"operandOneVariableName": "variableName1 | null",
|
|
42
|
+
"operandTwoVariableName": "variableName2 | null",
|
|
43
|
+
"operation": ${arithmetic.join("|")},
|
|
44
|
+
"variableName": "targetVariableName"
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
return prompt;
|
|
48
|
+
}
|
|
@@ -32,7 +32,7 @@ Select the perfect matching NLP name from the list that best fits the step's int
|
|
|
32
32
|
}
|
|
33
33
|
Rules:
|
|
34
34
|
- nlpName must be exactly one from the provided list.
|
|
35
|
-
|
|
35
|
+
"variableName": Generate a valid, descriptive variable name for storing the fetched value based on the step intent (e.g., a valid camelCase identifier such as "pageTitle", "extractedText", "userEmail", "itemPrice", or "orderId"). It must be a valid programming identifier (letters, numbers, and underscores; cannot start with a number; no spaces or special characters). If a variable name is explicitly mentioned in the step, use it exactly as provided. Otherwise, generate a variable name based on the step intent and always try to maintain a similar length to the variable name mentioned in the step.
|
|
36
36
|
- Use context from the steps : ${priorAndNextSteps}, keyword and json to search for FF-inspecter.
|
|
37
37
|
- **Find the FF-inspecter attribute value of the element in the Simplified DOM whose text or attributes best match the step.**
|
|
38
38
|
- **CRITICAL: For media actions (GetVideo..., GetAudio...), ALWAYS prioritize the actual <video> or <audio> element. DO NOT select container <div>, <span> or code block elements that merely contain the media tag as text. If you see a code block and a real media element, choose the real media element.**
|
|
@@ -30,7 +30,7 @@ Return **only valid JSON** in the following format:
|
|
|
30
30
|
}
|
|
31
31
|
Rules:
|
|
32
32
|
- nlpName must be exactly one from the provided list.
|
|
33
|
-
|
|
33
|
+
"variableName": Generate a valid, descriptive variable name for storing the fetched value based on the step intent (e.g., a valid camelCase identifier such as "pageTitle", "extractedText", "userEmail", "itemPrice", or "orderId"). It must be a valid programming identifier (letters, numbers, and underscores; cannot start with a number; no spaces or special characters). If a variable name is explicitly mentioned in the step, use it exactly as provided. Otherwise, generate a variable name based on the step intent and always try to maintain a similar length to the variable name mentioned in the step.
|
|
34
34
|
- for screenshots, extract the inputText from the step. like what they what to name image.if not present then leave it empty.
|
|
35
35
|
- Use context from the steps : ${priorAndNextSteps}, json to search for FF-inspecter.
|
|
36
36
|
- **Find the FF-inspecter attribute value of the element in the Simplified JSON whose text or attributes best match the step.**
|
|
@@ -13,6 +13,8 @@ Instructions:
|
|
|
13
13
|
1. Analyze the current step and previous steps carefully.
|
|
14
14
|
|
|
15
15
|
2. Priority rules (strict order):
|
|
16
|
+
- If a specific variable name is mentioned (e.g., "atpValue", "atpMulValue", "atpdivValue", "finalResult") → match to the step in "Previous steps data" with that exact "variableName".
|
|
17
|
+
- If referential calculation phrases are mentioned (e.g., "calculated final result", "calculated value", "final result", "calculation result", "result of calculation") → match to the most recent calculation or arithmetic step in "Previous steps data".
|
|
16
18
|
- If a step index or step reference is mentioned (e.g., "step 2", "2nd step", "3rd step", "3nd step", "step 1.1", "sub-step 1.1") → match to the corresponding stepindex (e.g., 2nd step -> stepindex 2, step 1.1 -> sub-step with stepindex "1.1"). If the matched step contains "subSteps", extract from the subStep matching the field name or sub-step index, and extract ONLY from that subStep.
|
|
17
19
|
- If a field name is mentioned (e.g., email, password, first name) → extract from the matching field step or subStep.
|
|
18
20
|
- If words like "above", "previous", "same" → extract from the most relevant previous step or subStep.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.keywordExtractorMobile = keywordExtractorMobile;
|
|
4
4
|
async function keywordExtractorMobile({ priorAndNextSteps }) {
|
|
5
|
-
const allowedActions = ["openApp", "tap", "enter", "wait", "verify", "scroll", "get", "closeApp", "combined", "switchToWeb", "getOtp", "enterOtp"];
|
|
5
|
+
const allowedActions = ["openApp", "tap", "enter", "wait", "verify", "scroll", "get", "closeApp", "combined", "switchToWeb", "getOtp", "enterOtp", "arithmetic"];
|
|
6
6
|
const prompt = `
|
|
7
7
|
You are an expert in mobile app testing.
|
|
8
8
|
From the step, extract ONLY the meaningful keywords so that i can search for the element in the dom.
|
|
@@ -30,7 +30,7 @@ Rules:
|
|
|
30
30
|
- If the step is for the switching to web then provide the action as the switchToWeb
|
|
31
31
|
- 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.
|
|
32
32
|
-** 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**
|
|
33
|
-
- action: openApp for opening or launching of app and activate app is there in step give action as combined, tap for taping or selecting or clicking or pressing, enter for entering input, wait for waiting or sleeping, verify for verifying or checking,scroll for scrolling and swiping, get for getting and fetching element and gtting logs and getting driver or instance details, closeApp for closing the app but not for terminating app step.
|
|
33
|
+
- action: openApp for opening or launching of app and activate app is there in step give action as combined, tap for taping or selecting or clicking or pressing, enter for entering input, wait for waiting or sleeping, verify for verifying or checking,scroll for scrolling and swiping, get for getting and fetching element and gtting logs and getting driver or instance details, closeApp for closing the app but not for terminating app step, arithmetic for performing arithmetic operations (multiply, divide, add, subtract, calculate) or storing/assigning calculation results and captured values into variables.
|
|
34
34
|
- If step is press any key give action as tap.if step is clear or clearandenter give action as enter and if step is open chrome browser app por application and it doesnot have app package or bundle id give action as combined but if step has app package or bundle id give action as openApp.
|
|
35
35
|
- action must be one of from this list ${allowedActions}.if not one of them, return action as 'combined'. if step about set or setting or find, install apk or ipa, uninstall apk or ipa,activate app with app package or bundle id, pinch in or pinch out or related turn wifi or airplane mode return action as 'combined'
|
|
36
36
|
- if the step action is about finding or check app is installed or open chrome browser or open notification bar or terminate app using app package or bumdle id or running app in the background for some seconds then provide action as combined.
|
|
@@ -15,6 +15,7 @@ exports.userInputFormatters = {
|
|
|
15
15
|
[promptType_js_1.PromptType.INPUT_CONTEXT_PROMPT]: (userInput) => `Extract the input text from the following context:\n\n${JSON.stringify(userInput.currentStep, null, 2)}`,
|
|
16
16
|
[promptType_js_1.PromptType.OTP_EXTRACTOR]: (userInput) => `Extract the OTP from this SMS body:\n\n${JSON.stringify(userInput.smsBody, null, 2)}`,
|
|
17
17
|
[promptType_js_1.PromptType.FILE_VERIFY_PROMPT]: (userInput) => `Extract the file verification action data for the following step:\n\n${JSON.stringify(userInput.currentStep, null, 2)}`,
|
|
18
|
+
[promptType_js_1.PromptType.ARITHMETIC_PROMPT]: (userInput) => `Extract arithmetic operation details for the following step:\n\n${JSON.stringify(userInput.currentStep, null, 2)}`,
|
|
18
19
|
[promptType_js_1.PromptType.VISION_PROMPT]: (userInput) => {
|
|
19
20
|
let imageBase64 = null;
|
|
20
21
|
if (userInput.annotatedScreenshot) {
|
|
@@ -378,4 +378,5 @@ export declare class ActionExecutor implements IActionExecutor {
|
|
|
378
378
|
regex: string;
|
|
379
379
|
} | null>, returnTypeVariableName?: string): Promise<void>;
|
|
380
380
|
verifyPDF(value: string, isDownload?: boolean, filePath?: string | null): Promise<void>;
|
|
381
|
+
arithmetic(result: any): Promise<void>;
|
|
381
382
|
}
|
|
@@ -359,6 +359,7 @@ const mouseReleaseLeftMouseButton_js_1 = require("./interaction/mouse/mouseRelea
|
|
|
359
359
|
const mouseClickOnCurrentCursorNTImes_js_1 = require("./interaction/mouse/mouseClickOnCurrentCursorNTImes.js");
|
|
360
360
|
const getOtp_js_1 = require("./interaction/elementlessActions/getOtp.js");
|
|
361
361
|
const VerifyPDF_js_1 = require("./interaction/files/VerifyPDF.js");
|
|
362
|
+
const arithmeticOperations_js_1 = require("./interaction/arithmetic/arithmeticOperations.js");
|
|
362
363
|
class ActionExecutor {
|
|
363
364
|
constructor(driver, scriptDataAppender, elementGetter, platform, adbPath, stepsInputData) {
|
|
364
365
|
this.driver = driver;
|
|
@@ -6708,5 +6709,29 @@ class ActionExecutor {
|
|
|
6708
6709
|
throw error;
|
|
6709
6710
|
}
|
|
6710
6711
|
}
|
|
6712
|
+
async arithmetic(result) {
|
|
6713
|
+
try {
|
|
6714
|
+
await (0, arithmeticOperations_js_1.performArithmeticOperation)({
|
|
6715
|
+
operandOne: result.operandOne,
|
|
6716
|
+
operandTwo: result.operandTwo,
|
|
6717
|
+
operandOneVariableName: result.operandOneVariableName,
|
|
6718
|
+
operandTwoVariableName: result.operandTwoVariableName,
|
|
6719
|
+
operation: result.operation,
|
|
6720
|
+
variableName: result.variableName,
|
|
6721
|
+
returnTypeVariableName: result.returnTypeVariableName || result.variableName || this.currentReturnTypeVariableName || this.currentVariableName,
|
|
6722
|
+
stepIndex: result.stepIndex ?? this.currentStepIndex,
|
|
6723
|
+
currentStep: result.currentStep ?? this.currentStepText,
|
|
6724
|
+
manualStep: result.manualStep ?? this.manualStepText,
|
|
6725
|
+
stepsInputData: result.stepsInputData ?? this.stepsInputData,
|
|
6726
|
+
scriptDataAppender: this.scriptDataAppender,
|
|
6727
|
+
platform: this.platform,
|
|
6728
|
+
elementGetter: this.elementGetter,
|
|
6729
|
+
});
|
|
6730
|
+
}
|
|
6731
|
+
catch (error) {
|
|
6732
|
+
logData_js_1.logger.error("Error in [ActionExecutor] arithmetic", error);
|
|
6733
|
+
throw error;
|
|
6734
|
+
}
|
|
6735
|
+
}
|
|
6711
6736
|
}
|
|
6712
6737
|
exports.ActionExecutor = ActionExecutor;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.enterDataToAlert = enterDataToAlert;
|
|
4
4
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
5
|
-
const
|
|
5
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
6
6
|
async function enterDataToAlert(args) {
|
|
7
7
|
try {
|
|
8
8
|
await args.driver.sendAlertText(args.value);
|
|
@@ -11,7 +11,7 @@ async function enterDataToAlert(args) {
|
|
|
11
11
|
nlpName: "EnterDataToAlert",
|
|
12
12
|
stepInputs: [args.variableName ? `variable:${args.variableName}` : args.value],
|
|
13
13
|
});
|
|
14
|
-
(0,
|
|
14
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
|
|
15
15
|
}
|
|
16
16
|
catch (error) {
|
|
17
17
|
args.scriptDataAppender.setErrorNLP("EnterDataToAlert");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTextPresentOnAlertPopup = getTextPresentOnAlertPopup;
|
|
4
4
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
5
|
-
const
|
|
5
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
6
6
|
async function getTextPresentOnAlertPopup(args) {
|
|
7
7
|
try {
|
|
8
8
|
const text = await args.driver.getAlertText();
|
|
@@ -11,7 +11,7 @@ async function getTextPresentOnAlertPopup(args) {
|
|
|
11
11
|
nlpName: "GetTextPresentOnAlertPopup",
|
|
12
12
|
returnTypeVariableName: args.returnTypeVariableName
|
|
13
13
|
});
|
|
14
|
-
(0,
|
|
14
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, text);
|
|
15
15
|
}
|
|
16
16
|
catch (error) {
|
|
17
17
|
args.scriptDataAppender.setErrorNLP("GetTextPresentOnAlertPopup");
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.performArithmeticOperation = performArithmeticOperation;
|
|
4
|
+
const logData_js_1 = require("../../../../utils/logger/logData.js");
|
|
5
|
+
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
6
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
7
|
+
async function performArithmeticOperation(args) {
|
|
8
|
+
try {
|
|
9
|
+
const normalizedOp = (args.operation || "").toLowerCase().trim();
|
|
10
|
+
const num1 = parseFloat(args.operandOne);
|
|
11
|
+
const num2 = parseFloat(args.operandTwo || "0");
|
|
12
|
+
let result;
|
|
13
|
+
let operation = "";
|
|
14
|
+
switch (normalizedOp) {
|
|
15
|
+
case "add":
|
|
16
|
+
result = num1 + num2;
|
|
17
|
+
operation = "+";
|
|
18
|
+
break;
|
|
19
|
+
case "subtract":
|
|
20
|
+
result = num1 - num2;
|
|
21
|
+
operation = "-";
|
|
22
|
+
break;
|
|
23
|
+
case "multiply":
|
|
24
|
+
result = num1 * num2;
|
|
25
|
+
operation = "*";
|
|
26
|
+
break;
|
|
27
|
+
case "divide":
|
|
28
|
+
if (num2 === 0) {
|
|
29
|
+
throw new Error("Division by zero in arithmetic operation.");
|
|
30
|
+
}
|
|
31
|
+
result = num1 / num2;
|
|
32
|
+
operation = "/";
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
throw new Error(`Unsupported arithmetic operation: '${args.operation}'. Supported operations are addition, subtraction, multiplication, division.`);
|
|
36
|
+
}
|
|
37
|
+
const calculatedResult = (result).toString();
|
|
38
|
+
args.returnTypeVariableName = args.returnTypeVariableName || args.variableName;
|
|
39
|
+
if (args.scriptDataAppender) {
|
|
40
|
+
const stepInputs = [
|
|
41
|
+
args.operandOneVariableName ? `variable:${args.operandOneVariableName}` : String(num1),
|
|
42
|
+
operation,
|
|
43
|
+
args.operandTwoVariableName ? `variable:${args.operandTwoVariableName}` : String(num2),
|
|
44
|
+
];
|
|
45
|
+
(0, appendScriptData_js_1.appendScriptData)({
|
|
46
|
+
scriptDataAppender: args.scriptDataAppender,
|
|
47
|
+
nlpName: "ArithmeticOperationsOnOperands",
|
|
48
|
+
stepInputs,
|
|
49
|
+
elementGetter: args.elementGetter,
|
|
50
|
+
platform: args.platform,
|
|
51
|
+
returnTypeVariableName: args.returnTypeVariableName,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, calculatedResult);
|
|
55
|
+
logData_js_1.logger.info(`Arithmetic operation performed: ${num1} ${operation} ${num2} = ${result}`);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
args.scriptDataAppender?.setErrorNLP("ArithmeticOperationsOnOperands");
|
|
59
|
+
throw new Error(`Arithmetic action failed`, { cause: error });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.clearAndEnter = clearAndEnter;
|
|
4
4
|
const enterActionHelper_js_1 = require("../../../../utils/helpers/enterActionHelper.js");
|
|
5
5
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
6
|
-
const
|
|
6
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
7
7
|
async function clearAndEnter(args) {
|
|
8
8
|
const nlpName = args.platform === "ios" ? "IOS_ClearThenEnterInput" : "MOB_ClearThenEnterInput";
|
|
9
9
|
switch (args.platform) {
|
|
@@ -27,7 +27,7 @@ async function clearAndEnter(args) {
|
|
|
27
27
|
selector: args.selector,
|
|
28
28
|
platform: args.platform
|
|
29
29
|
});
|
|
30
|
-
(0,
|
|
30
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
|
|
31
31
|
}
|
|
32
32
|
catch (error) {
|
|
33
33
|
args.scriptDataAppender.setErrorNLP(nlpName);
|
|
@@ -54,7 +54,7 @@ async function clearAndEnter(args) {
|
|
|
54
54
|
selector: xpathPath,
|
|
55
55
|
platform: args.platform
|
|
56
56
|
});
|
|
57
|
-
(0,
|
|
57
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
|
|
58
58
|
}
|
|
59
59
|
catch (error) {
|
|
60
60
|
args.scriptDataAppender.setErrorNLP("ClearThenEnterInput");
|
|
@@ -4,7 +4,7 @@ exports.GetOtpAction = GetOtpAction;
|
|
|
4
4
|
const logData_js_1 = require("../../../../utils/logger/logData.js");
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
6
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
7
|
-
const
|
|
7
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
8
8
|
async function GetOtpAction(args) {
|
|
9
9
|
try {
|
|
10
10
|
// const udid = (args.driver.capabilities as any)["appium:udid"] || (args.driver.capabilities as any).udid;
|
|
@@ -30,12 +30,12 @@ async function GetOtpAction(args) {
|
|
|
30
30
|
if (existingSms && now - existingSms.date <= (timeFrom * 1000)) {
|
|
31
31
|
const smsBody = existingSms.body;
|
|
32
32
|
logData_js_1.logger.info("SMS body:", smsBody);
|
|
33
|
-
let
|
|
33
|
+
let _regex;
|
|
34
34
|
let otpValue;
|
|
35
35
|
if (args.otpExtractor) {
|
|
36
36
|
const otpResult = await args.otpExtractor(smsBody);
|
|
37
37
|
if (otpResult?.otp && otpResult.regex) {
|
|
38
|
-
|
|
38
|
+
_regex = otpResult.regex;
|
|
39
39
|
otpValue = otpResult.otp;
|
|
40
40
|
logData_js_1.logger.info("Extracted OTP:", otpResult.otp, "Generated Regex:", otpResult.regex);
|
|
41
41
|
}
|
|
@@ -50,7 +50,7 @@ async function GetOtpAction(args) {
|
|
|
50
50
|
platform: "android",
|
|
51
51
|
returnTypeVariableName: args.returnTypeVariableName
|
|
52
52
|
});
|
|
53
|
-
(0,
|
|
53
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, otpValue || smsBody);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
const baselineId = existingSms?.id;
|
|
@@ -88,7 +88,7 @@ async function GetOtpAction(args) {
|
|
|
88
88
|
platform: "android",
|
|
89
89
|
returnTypeVariableName: args.returnTypeVariableName
|
|
90
90
|
});
|
|
91
|
-
(0,
|
|
91
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, otpValue || smsBody);
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
@@ -4,7 +4,7 @@ exports.MOB_EnterInputIntoElementFromClipBoard = MOB_EnterInputIntoElementFromCl
|
|
|
4
4
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
5
5
|
const enterActionHelper_js_1 = require("../../../../utils/helpers/enterActionHelper.js");
|
|
6
6
|
const logData_js_1 = require("../../../../utils/logger/logData.js");
|
|
7
|
-
const
|
|
7
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
8
8
|
async function MOB_EnterInputIntoElementFromClipBoard(args) {
|
|
9
9
|
try {
|
|
10
10
|
const { ffNumber, xpathPath } = (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
|
|
@@ -26,7 +26,7 @@ async function MOB_EnterInputIntoElementFromClipBoard(args) {
|
|
|
26
26
|
selector: args.selector,
|
|
27
27
|
platform: args.platform
|
|
28
28
|
});
|
|
29
|
-
(0,
|
|
29
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, value);
|
|
30
30
|
}
|
|
31
31
|
catch (error) {
|
|
32
32
|
args.scriptDataAppender.setErrorNLP("MOB_EnterInputIntoElementFromClipBoard");
|
|
@@ -37,7 +37,7 @@ exports.enterInput = enterInput;
|
|
|
37
37
|
const enterActionHelper_js_1 = require("../../../../utils/helpers/enterActionHelper.js");
|
|
38
38
|
const logData_js_1 = require("../../../../utils/logger/logData.js");
|
|
39
39
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
40
|
-
const
|
|
40
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
41
41
|
async function enterInput(args) {
|
|
42
42
|
const nlpName = args.platform === "ios" ? "IOS_SendKeys" : "MOB_SendKeys";
|
|
43
43
|
switch (args.platform) {
|
|
@@ -79,7 +79,7 @@ async function enterInput(args) {
|
|
|
79
79
|
selector: args.selector,
|
|
80
80
|
platform: args.platform
|
|
81
81
|
});
|
|
82
|
-
(0,
|
|
82
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
|
|
83
83
|
}
|
|
84
84
|
catch (error) {
|
|
85
85
|
args.scriptDataAppender.setErrorNLP(nlpName);
|
|
@@ -111,7 +111,7 @@ async function enterInput(args) {
|
|
|
111
111
|
selector: xpathPath,
|
|
112
112
|
platform: args.platform
|
|
113
113
|
});
|
|
114
|
-
(0,
|
|
114
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
|
|
115
115
|
}
|
|
116
116
|
catch (error) {
|
|
117
117
|
args.scriptDataAppender.setErrorNLP("SendKeys");
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.enterInputAndPress = enterInputAndPress;
|
|
4
4
|
const enterActionHelper_js_1 = require("../../../../utils/helpers/enterActionHelper.js");
|
|
5
5
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
6
|
-
const
|
|
6
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
7
7
|
async function enterInputAndPress(args) {
|
|
8
8
|
switch (args.platform) {
|
|
9
9
|
case "android":
|
|
@@ -54,7 +54,7 @@ async function enterInputAndPress(args) {
|
|
|
54
54
|
selector: args.selector,
|
|
55
55
|
platform: args.platform
|
|
56
56
|
});
|
|
57
|
-
(0,
|
|
57
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, inputValue || args.value);
|
|
58
58
|
}
|
|
59
59
|
catch (error) {
|
|
60
60
|
args.scriptDataAppender.setErrorNLP("MOB_EnterDataAndPressKey");
|
|
@@ -109,7 +109,7 @@ async function enterInputAndPress(args) {
|
|
|
109
109
|
selector: xpathPath,
|
|
110
110
|
platform: args.platform
|
|
111
111
|
});
|
|
112
|
-
(0,
|
|
112
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, inputValue || args.value);
|
|
113
113
|
}
|
|
114
114
|
catch (error) {
|
|
115
115
|
args.scriptDataAppender.setErrorNLP("EnterDataAndPressKey");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.enterUrl = enterUrl;
|
|
4
4
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
5
|
-
const
|
|
5
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
6
6
|
async function enterUrl(args) {
|
|
7
7
|
const nlpName = args.platform === "ios" ? "IOS_EnterUrl" : "MOB_EnterUrl";
|
|
8
8
|
switch (args.platform) {
|
|
@@ -24,7 +24,7 @@ async function enterUrl(args) {
|
|
|
24
24
|
nlpName: nlpName,
|
|
25
25
|
stepInputs: [args.variableName ? `variable:${args.variableName}` : args.value],
|
|
26
26
|
});
|
|
27
|
-
(0,
|
|
27
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
30
|
args.scriptDataAppender.setErrorNLP(nlpName);
|
|
@@ -40,7 +40,7 @@ async function enterUrl(args) {
|
|
|
40
40
|
nlpName: 'EnterURL',
|
|
41
41
|
stepInputs: [args.variableName ? `variable:${args.variableName}` : args.value],
|
|
42
42
|
});
|
|
43
|
-
(0,
|
|
43
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
|
|
44
44
|
}
|
|
45
45
|
catch (error) {
|
|
46
46
|
args.scriptDataAppender.setErrorNLP("EnterURL");
|
|
@@ -4,7 +4,7 @@ exports.enterInputUsingJs = enterInputUsingJs;
|
|
|
4
4
|
const enterActionHelper_js_1 = require("../../../../utils/helpers/enterActionHelper.js");
|
|
5
5
|
const logData_js_1 = require("../../../../utils/logger/logData.js");
|
|
6
6
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
7
|
-
const
|
|
7
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
8
8
|
async function enterInputUsingJs(args) {
|
|
9
9
|
try {
|
|
10
10
|
const { ffNumber, xpathPath } = (0, enterActionHelper_js_1.enterActionHelper)(args.pageDOM, args.fireflinkIndex);
|
|
@@ -30,7 +30,7 @@ async function enterInputUsingJs(args) {
|
|
|
30
30
|
selector: xpathPath,
|
|
31
31
|
platform: args.platform
|
|
32
32
|
});
|
|
33
|
-
(0,
|
|
33
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
|
|
34
34
|
}
|
|
35
35
|
catch (error) {
|
|
36
36
|
args.scriptDataAppender.setErrorNLP("EnterInputUsingJS");
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.waitAndEnter = waitAndEnter;
|
|
4
4
|
const enterActionHelper_js_1 = require("../../../../utils/helpers/enterActionHelper.js");
|
|
5
5
|
const appendScriptData_js_1 = require("../../../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
6
|
-
const
|
|
6
|
+
const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
|
|
7
7
|
async function waitAndEnter(args) {
|
|
8
8
|
const DEFAULT_WAIT = 5;
|
|
9
9
|
const parseValue = (value) => {
|
|
@@ -38,7 +38,7 @@ async function waitAndEnter(args) {
|
|
|
38
38
|
selector: args.selector,
|
|
39
39
|
platform: args.platform
|
|
40
40
|
});
|
|
41
|
-
(0,
|
|
41
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, inputValue || args.value);
|
|
42
42
|
}
|
|
43
43
|
catch (error) {
|
|
44
44
|
args.scriptDataAppender.setErrorNLP("MOB_WaitAndSendKeys");
|
|
@@ -74,7 +74,7 @@ async function waitAndEnter(args) {
|
|
|
74
74
|
selector: args.selector,
|
|
75
75
|
platform: args.platform
|
|
76
76
|
});
|
|
77
|
-
(0,
|
|
77
|
+
(0, saveStepInputData_js_1.saveStepInputData)(args, inputValue || args.value);
|
|
78
78
|
}
|
|
79
79
|
catch (error) {
|
|
80
80
|
args.scriptDataAppender.setErrorNLP("WaitAndSendKeys");
|