ff-automationv2 2.2.32 → 2.2.34-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/dist/ai/llmprompts/llmPromptTypes/systemPromptTypes.d.ts +3 -0
  2. package/dist/ai/llmprompts/promptRegistry.js +4 -0
  3. package/dist/ai/llmprompts/systemPrompts/actionExtractorPrompt.js +16 -12
  4. package/dist/ai/llmprompts/systemPrompts/arithmeticPrompt.d.ts +2 -0
  5. package/dist/ai/llmprompts/systemPrompts/arithmeticPrompt.js +48 -0
  6. package/dist/ai/llmprompts/systemPrompts/getActionExtractorPrompt.js +1 -1
  7. package/dist/ai/llmprompts/systemPrompts/getActionExtractorPromptMob.js +1 -1
  8. package/dist/ai/llmprompts/systemPrompts/inputContextPrompt.js +2 -0
  9. package/dist/ai/llmprompts/systemPrompts/mobileKeywordExtractor.js +2 -2
  10. package/dist/ai/llmprompts/userPrompts/userPrompt.js +1 -0
  11. package/dist/automation/actions/executor.d.ts +1 -0
  12. package/dist/automation/actions/executor.js +25 -0
  13. package/dist/automation/actions/interaction/alert/enterDataToAlert.js +2 -2
  14. package/dist/automation/actions/interaction/alert/getTextPresentOnAlertPopup.js +2 -2
  15. package/dist/automation/actions/interaction/arithmetic/arithmeticOperations.d.ts +2 -0
  16. package/dist/automation/actions/interaction/arithmetic/arithmeticOperations.js +61 -0
  17. package/dist/automation/actions/interaction/clear/clear.js +4 -1
  18. package/dist/automation/actions/interaction/clear/clearAndEnter.js +7 -4
  19. package/dist/automation/actions/interaction/elementlessActions/getOtp.js +7 -7
  20. package/dist/automation/actions/interaction/enterActions/EnterInputIntoElementFromClipBoardInterface_mob.js +6 -3
  21. package/dist/automation/actions/interaction/enterActions/enterInput.js +8 -5
  22. package/dist/automation/actions/interaction/enterActions/enterInputAndPress.js +7 -4
  23. package/dist/automation/actions/interaction/enterActions/enterUrl.js +3 -3
  24. package/dist/automation/actions/interaction/enterActions/enterusingJs.js +2 -2
  25. package/dist/automation/actions/interaction/enterActions/waitAndEnter.js +7 -4
  26. package/dist/automation/actions/interaction/get/MOB_GetADBLogsForGivenAppPackage.js +2 -2
  27. package/dist/automation/actions/interaction/get/MOB_GetAllContexts.js +2 -2
  28. package/dist/automation/actions/interaction/get/MOB_GetAllWindowHandles.js +3 -3
  29. package/dist/automation/actions/interaction/get/MOB_GetAltitude.js +2 -2
  30. package/dist/automation/actions/interaction/get/MOB_GetBatteryPercentage.js +2 -2
  31. package/dist/automation/actions/interaction/get/MOB_GetBatteryStatus.js +2 -2
  32. package/dist/automation/actions/interaction/get/MOB_GetClipBoardText.js +2 -2
  33. package/dist/automation/actions/interaction/get/MOB_GetCurrentActivity.js +2 -2
  34. package/dist/automation/actions/interaction/get/MOB_GetCurrentAppPackage.js +2 -2
  35. package/dist/automation/actions/interaction/get/MOB_GetCurrentContext.js +2 -2
  36. package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceDate.js +2 -2
  37. package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceSettings.js +2 -2
  38. package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceStatus.js +2 -2
  39. package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceSystemBars.js +2 -2
  40. package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceTime.js +2 -2
  41. package/dist/automation/actions/interaction/get/MOB_GetCurrentOrientation.js +2 -2
  42. package/dist/automation/actions/interaction/get/MOB_GetCurrentSessionId.js +2 -2
  43. package/dist/automation/actions/interaction/get/MOB_GetDeviceLocation.js +2 -2
  44. package/dist/automation/actions/interaction/get/MOB_GetDeviceName.js +2 -2
  45. package/dist/automation/actions/interaction/get/MOB_GetDeviceOsVersion.js +2 -2
  46. package/dist/automation/actions/interaction/get/MOB_GetDeviceUdid.js +2 -2
  47. package/dist/automation/actions/interaction/get/MOB_GetHeightOfElement.js +2 -2
  48. package/dist/automation/actions/interaction/get/MOB_GetHeightOfScreen.js +2 -2
  49. package/dist/automation/actions/interaction/get/MOB_GetHourFromCurrentDeviceTime.js +2 -2
  50. package/dist/automation/actions/interaction/get/MOB_GetLatitude.js +2 -2
  51. package/dist/automation/actions/interaction/get/MOB_GetLongitude.js +2 -2
  52. package/dist/automation/actions/interaction/get/MOB_GetMinuteFromCurrentDeviceTime.js +2 -2
  53. package/dist/automation/actions/interaction/get/MOB_GetSecondFromCurrentDeviceTime.js +2 -2
  54. package/dist/automation/actions/interaction/get/MOB_GetSizeOfScreen.js +2 -2
  55. package/dist/automation/actions/interaction/get/MOB_GetSupportedPerformanceDataTypes.js +2 -2
  56. package/dist/automation/actions/interaction/get/MOB_GetTextFromElementAndSetToClipBoard.js +2 -2
  57. package/dist/automation/actions/interaction/get/MOB_GetWidthOfElement.js +2 -2
  58. package/dist/automation/actions/interaction/get/MOB_GetWidthOfScreen.js +2 -2
  59. package/dist/automation/actions/interaction/get/browserWindowGetPosition.js +2 -2
  60. package/dist/automation/actions/interaction/get/getAllBrokenImages.js +2 -2
  61. package/dist/automation/actions/interaction/get/getAllBrokenLinkCount.js +2 -2
  62. package/dist/automation/actions/interaction/get/getAllBrokenLinks.js +2 -2
  63. package/dist/automation/actions/interaction/get/getAllConsoleErrors.js +2 -2
  64. package/dist/automation/actions/interaction/get/getAllConsoleInformation.js +2 -2
  65. package/dist/automation/actions/interaction/get/getAllConsoleLogs.js +2 -2
  66. package/dist/automation/actions/interaction/get/getAllConsoleWarnings.js +2 -2
  67. package/dist/automation/actions/interaction/get/getAllCookieNames.js +2 -2
  68. package/dist/automation/actions/interaction/get/getAllCookieValues.js +2 -2
  69. package/dist/automation/actions/interaction/get/getAllSelectedOptions.js +2 -2
  70. package/dist/automation/actions/interaction/get/getAllTheOptionsFromListBoxAsText.js +2 -2
  71. package/dist/automation/actions/interaction/get/getAllTheOptionsFromListBoxAsTextInSortedOrder.js +2 -2
  72. package/dist/automation/actions/interaction/get/getAllTheSelectedOptionsFromListBoxAsText.js +2 -2
  73. package/dist/automation/actions/interaction/get/getAllWindowHandles.js +2 -2
  74. package/dist/automation/actions/interaction/get/getAttribute.js +3 -3
  75. package/dist/automation/actions/interaction/get/getAudioCurrentPlaybackRate.js +2 -2
  76. package/dist/automation/actions/interaction/get/getAudioCurrentSeekTime.js +2 -2
  77. package/dist/automation/actions/interaction/get/getAudioCurrentVolume.js +2 -2
  78. package/dist/automation/actions/interaction/get/getAudioDecodedByte.js +2 -2
  79. package/dist/automation/actions/interaction/get/getAudioDefaultPlaybackRate.js +2 -2
  80. package/dist/automation/actions/interaction/get/getAudioMediaLength.js +2 -2
  81. package/dist/automation/actions/interaction/get/getAudioMediaSource.js +2 -2
  82. package/dist/automation/actions/interaction/get/getBestPracticesScore.js +2 -2
  83. package/dist/automation/actions/interaction/get/getBrowserCount.js +2 -2
  84. package/dist/automation/actions/interaction/get/getBrowserVersion.js +2 -2
  85. package/dist/automation/actions/interaction/get/getCapabilityNames.js +2 -2
  86. package/dist/automation/actions/interaction/get/getClipBoardText.js +2 -2
  87. package/dist/automation/actions/interaction/get/getCollectiveApiResponseTime.js +2 -2
  88. package/dist/automation/actions/interaction/get/getCollectiveApiStatusCode.js +2 -2
  89. package/dist/automation/actions/interaction/get/getCssValue.js +2 -2
  90. package/dist/automation/actions/interaction/get/getCurrentDayOfTheWeek.js +2 -2
  91. package/dist/automation/actions/interaction/get/getCurrentSecondsFromCurrentSystemTime.js +2 -2
  92. package/dist/automation/actions/interaction/get/getCurrentSystemDate.js +2 -2
  93. package/dist/automation/actions/interaction/get/getCurrentSystemDay.js +2 -2
  94. package/dist/automation/actions/interaction/get/getCurrentSystemMonth.js +2 -2
  95. package/dist/automation/actions/interaction/get/getCurrentSystemTime.js +2 -2
  96. package/dist/automation/actions/interaction/get/getCurrentSystemYear.js +2 -2
  97. package/dist/automation/actions/interaction/get/getCurrentWindowHandle.js +2 -2
  98. package/dist/automation/actions/interaction/get/getDataFromApiRequestHeaderForJsonPath.js +2 -2
  99. package/dist/automation/actions/interaction/get/getDataFromApiResponseForJsonPath.js +2 -2
  100. package/dist/automation/actions/interaction/get/getDateWithGivenFormat.js +2 -2
  101. package/dist/automation/actions/interaction/get/getDriverInstance.js +2 -2
  102. package/dist/automation/actions/interaction/get/getFirstContentfulPaint.js +2 -2
  103. package/dist/automation/actions/interaction/get/getFirstSelectedOption.js +2 -2
  104. package/dist/automation/actions/interaction/get/getFullPaintTime.js +2 -2
  105. package/dist/automation/actions/interaction/get/getHTMLCodeOfPage.js +2 -2
  106. package/dist/automation/actions/interaction/get/getHeightOfBrowserWindow.js +2 -2
  107. package/dist/automation/actions/interaction/get/getHeightOfWebElement.js +2 -2
  108. package/dist/automation/actions/interaction/get/getHourFromCurrentSystemTime.js +2 -2
  109. package/dist/automation/actions/interaction/get/getImplicitTimeOut.js +2 -2
  110. package/dist/automation/actions/interaction/get/getLargestContentfulPaint.js +2 -2
  111. package/dist/automation/actions/interaction/get/getListBoxSize.js +2 -2
  112. package/dist/automation/actions/interaction/get/getListOfElementsFromLocatorTypeLocatorValue.js +3 -3
  113. package/dist/automation/actions/interaction/get/getLocation.js +3 -3
  114. package/dist/automation/actions/interaction/get/getMinuteFromCurrentSystemTime.js +2 -2
  115. package/dist/automation/actions/interaction/get/getNetworkRouteTime.js +2 -2
  116. package/dist/automation/actions/interaction/get/getNumberOfBrokenImages.js +2 -2
  117. package/dist/automation/actions/interaction/get/getNumberOfLinksPresentInCurrentPage.js +2 -2
  118. package/dist/automation/actions/interaction/get/getNumberOfWorkingLinksFromCurrentPage.js +2 -2
  119. package/dist/automation/actions/interaction/get/getOptions.js +2 -2
  120. package/dist/automation/actions/interaction/get/getPageTitle.js +2 -2
  121. package/dist/automation/actions/interaction/get/getPerformanceMetrics.js +2 -2
  122. package/dist/automation/actions/interaction/get/getPwaScore.js +2 -2
  123. package/dist/automation/actions/interaction/get/getRect.js +3 -3
  124. package/dist/automation/actions/interaction/get/getScreenshot.js +2 -2
  125. package/dist/automation/actions/interaction/get/getScreenshotAs.js +2 -2
  126. package/dist/automation/actions/interaction/get/getSeoScore.js +2 -2
  127. package/dist/automation/actions/interaction/get/getSingleApiRequestPayload.js +2 -2
  128. package/dist/automation/actions/interaction/get/getSingleApiResponse.js +2 -2
  129. package/dist/automation/actions/interaction/get/getSingleApiResponseTime.js +2 -2
  130. package/dist/automation/actions/interaction/get/getSingleApiStatusCode.js +2 -2
  131. package/dist/automation/actions/interaction/get/getSize.js +3 -3
  132. package/dist/automation/actions/interaction/get/getSizeOfBrowserWindow.js +2 -2
  133. package/dist/automation/actions/interaction/get/getStringDataFromLocalFile.js +2 -2
  134. package/dist/automation/actions/interaction/get/getSystemProperty.js +2 -2
  135. package/dist/automation/actions/interaction/get/getTagName.js +3 -3
  136. package/dist/automation/actions/interaction/get/getText.js +12 -5
  137. package/dist/automation/actions/interaction/get/getTheFirstSelectedOptionFromListBoxAsText.js +2 -2
  138. package/dist/automation/actions/interaction/get/getTotalNumberOfCookies.js +2 -2
  139. package/dist/automation/actions/interaction/get/getTunnelIdentifier.js +2 -2
  140. package/dist/automation/actions/interaction/get/getURLPresentInAddressBar.js +2 -2
  141. package/dist/automation/actions/interaction/get/getUserHomeDirectory.js +2 -2
  142. package/dist/automation/actions/interaction/get/getValueByCookieName.js +2 -2
  143. package/dist/automation/actions/interaction/get/getValueFromLocalStorage.js +2 -2
  144. package/dist/automation/actions/interaction/get/getValueOfSystemVariable.js +2 -2
  145. package/dist/automation/actions/interaction/get/getVideoCurrentPlaybackRate.js +2 -2
  146. package/dist/automation/actions/interaction/get/getVideoCurrentSeekTime.js +2 -2
  147. package/dist/automation/actions/interaction/get/getVideoCurrentVolume.js +2 -2
  148. package/dist/automation/actions/interaction/get/getVideoDecodedByte.js +2 -2
  149. package/dist/automation/actions/interaction/get/getVideoDefaultPlaybackRate.js +2 -2
  150. package/dist/automation/actions/interaction/get/getVideoMediaLength.js +2 -2
  151. package/dist/automation/actions/interaction/get/getVideoMediaSource.js +2 -2
  152. package/dist/automation/actions/interaction/get/getWidthOfBrowser.js +2 -2
  153. package/dist/automation/actions/interaction/get/getWidthOfWebElement.js +2 -2
  154. package/dist/automation/actions/interaction/get/getWorkingLinksFromCurrentPage.js +2 -2
  155. package/dist/automation/actions/interaction/get/getWrappedElement.js +2 -2
  156. package/dist/automation/actions/interaction/get/getWrappedOptionFromListBoxAsText.js +2 -2
  157. package/dist/automation/actions/interaction/get/getXLocationOfBrowserWindow.js +2 -2
  158. package/dist/automation/actions/interaction/get/getXLocationOfWebElement.js +3 -3
  159. package/dist/automation/actions/interaction/get/getYLocationOfBrowserWindow.js +2 -2
  160. package/dist/automation/actions/interaction/get/getYLocationOfWebElement.js +3 -3
  161. package/dist/automation/actions/interaction/iframe/switchToDefaultContent.js +1 -1
  162. package/dist/automation/actions/interaction/shadowDom/shadowDomEnter.js +2 -2
  163. package/dist/automation/actions/interaction/shadowDom/shadowDomGetText.js +2 -2
  164. package/dist/automation/actions/interaction/verify/VerifyElementNotContainsText.js +4 -1
  165. package/dist/automation/actions/interaction/verify/verifypartialtext.js +9 -2
  166. package/dist/automation/actions/interaction/verify/verifytext.js +9 -2
  167. package/dist/automation/actions/interface/FireFlinkResponseSchema.d.ts +13 -0
  168. package/dist/automation/actions/interface/FireFlinkResponseSchema.js +10 -1
  169. package/dist/automation/actions/interface/arithmeticActionInterface.d.ts +18 -0
  170. package/dist/automation/actions/interface/arithmeticActionInterface.js +2 -0
  171. package/dist/core/constants/allAction.js +2 -1
  172. package/dist/core/constants/supportedActions.js +2 -1
  173. package/dist/core/helpers/elementSelectorResolver.d.ts +1 -1
  174. package/dist/core/helpers/elementSelectorResolver.js +3 -2
  175. package/dist/core/helpers/runnerDomPipeline.d.ts +2 -2
  176. package/dist/core/helpers/runnerDomPipeline.js +20 -9
  177. package/dist/core/helpers/visionFallbackHandler.js +4 -4
  178. package/dist/core/interfaces/actionInterface.d.ts +2 -0
  179. package/dist/core/interfaces/automationRunnerInterface.d.ts +1 -0
  180. package/dist/core/interfaces/promptInterface.d.ts +3 -0
  181. package/dist/core/main/actionHandlerFactory.js +3 -0
  182. package/dist/core/main/runAutomationScript.js +53 -8
  183. package/dist/core/types/promptType.d.ts +2 -1
  184. package/dist/core/types/promptType.js +1 -0
  185. package/dist/fireflinkData/fireflinkLocators/getListOfLocators.d.ts +2 -1
  186. package/dist/fireflinkData/fireflinkLocators/getListOfLocators.js +2 -2
  187. package/dist/fireflinkData/fireflinkScript/appendScriptData.js +42 -6
  188. package/dist/fireflinkData/fireflinkScript/scriptGenrationData.d.ts +1 -0
  189. package/dist/fireflinkData/fireflinkScript/scriptGenrationData.js +1 -0
  190. package/dist/imageAnalysisWeb/annotateScreenshot.d.ts +1 -1
  191. package/dist/imageAnalysisWeb/annotateScreenshot.js +24 -10
  192. package/dist/imageAnalysisWeb/generateAnnotatedScreenshots.js +5 -2
  193. package/dist/tests/senario.d.ts +0 -0
  194. package/dist/tests/senario.js +1120 -0
  195. package/dist/tests/test12.d.ts +1 -0
  196. package/dist/tests/test12.js +34 -65
  197. package/dist/utils/DomExtraction/jsForAttributeInjection.js +23 -0
  198. package/dist/utils/helpers/xpathcreation.js +3 -0
  199. package/dist/utils/iframesExtraction/findElementUsingFF.js +1 -2
  200. package/dist/utils/iframesExtraction/switchToIframeByMeta.js +1 -1
  201. package/dist/utils/workers/locatorWorker.js +3 -1
  202. package/package.json +1 -1
  203. /package/dist/utils/helpers/{getHelper.d.ts → saveStepInputData.d.ts} +0 -0
  204. /package/dist/utils/helpers/{getHelper.js → saveStepInputData.js} +0 -0
@@ -38,3 +38,6 @@ export type combinedActionArgs = {
38
38
  export type inputContextArgs = {
39
39
  inputStepsContext: any[];
40
40
  };
41
+ export type arithmeticArgs = {
42
+ inputStepsContext: any[];
43
+ };
@@ -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. Example: "Click on x above y" → x is the target, y is the reference → ["x", "y"].
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 (true ONLY if action is verify/enter AND the step contains an actual referential phrase pointing to an earlier step's data — see isStepValueDependable rule below for the full test and examples; false if the value is literal or no referential phrase is present. Never consider future steps.),
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
- - isStepValueDependable (boolean):
108
- • Test is REFERENTIAL vs LITERAL, not sentence completeness — e.g. "enter 2nd step input in name" is a complete sentence but still referential, since the value itself isn't written there.
109
- • Set true ONLY when action is 'verify' or 'enter' AND the step contains an actual referential phrase pointing to data from an earlier step (by step number, "previous/prior/earlier/that/same" wording, or naming what was fetched/copied/retrieved there). Confirm the referenced step exists earlier in priorAndNextSteps, never a future step.
110
- • Set false when the value is written literally, or no referential phrase is present, or the action isn't verify/enter.
111
- • DO NOT infer true from an element/field name alone when that word appears only in the CURRENT step's own target/element — e.g. "get text from Password" is false because "Password" there is just this step's own target, not a value pointing elsewhere.
112
- • EXCEPTION — reference-by-element-name: if the VALUE being entered matches (case-insensitively) the elementName or keyword of a 'get' or 'enter' action from an EARLIER step in priorAndNextSteps, treat this as referential (true) even with no explicit pointer wording like "previous"/"same" — this is a common shorthand for "reuse whatever was entered/fetched there". Example: step 2 is "enter santosh@123 in password" (elementName "Password"), step 3 is "enter password in confirm password" → true, because the value "password" matches step 2's elementName, meaning step 3 is reusing step 2's entered value, not typing the literal word "password".
113
- • Examples (illustrative, not exhaustive): "enter 2nd step input in name" → true. "enter the OTP received earlier in name" → true. "enter 'John' in name" → false. "get text from Password" → false (no reference present). "enter password in confirm password" (given step 2 entered a value into a "Password" field) → true.
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,2 @@
1
+ import { arithmeticArgs } from "../llmPromptTypes/systemPromptTypes.js";
2
+ export declare function arithmeticPrompt({ inputStepsContext, }: arithmeticArgs): Promise<string>;
@@ -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
- - "variableName": Generate a valid, descriptive variable name for storing the fetched value based on the step intent (e.g., valid camelCase identifier such as "pageTitle", "extractedText", "userEmail", "itemPrice", "orderId"). It must be a valid programming identifier (letters, numbers, underscores; cannot start with a number; no spaces or special characters).
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
- - "variableName": Generate a valid, descriptive variable name for storing the fetched value based on the step intent (e.g., valid camelCase identifier such as "deviceDate", "extractedText", "batteryLevel", "currentOrientation"). It must be a valid programming identifier (letters, numbers, underscores; cannot start with a number; no spaces or special characters).
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 getHelper_js_1 = require("../../../../utils/helpers/getHelper.js");
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, getHelper_js_1.saveStepInputData)(args, args.value);
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 getHelper_js_1 = require("../../../../utils/helpers/getHelper.js");
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, getHelper_js_1.saveStepInputData)(args, text);
14
+ (0, saveStepInputData_js_1.saveStepInputData)(args, text);
15
15
  }
16
16
  catch (error) {
17
17
  args.scriptDataAppender.setErrorNLP("GetTextPresentOnAlertPopup");
@@ -0,0 +1,2 @@
1
+ import { ArithmeticActionInterface } from "../../interface/arithmeticActionInterface.js";
2
+ export declare function performArithmeticOperation(args: ArithmeticActionInterface): Promise<void>;
@@ -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
+ }
@@ -9,7 +9,10 @@ async function clear(args) {
9
9
  case "android":
10
10
  case "ios":
11
11
  try {
12
- const { ffNumber, xpathPath } = (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
12
+ const isWebView = args.pageDOM?.includes("ff-inspect");
13
+ const { ffNumber, xpathPath } = isWebView
14
+ ? (0, enterActionHelper_js_1.enterActionHelper)(args.pageDOM, args.fireflinkIndex)
15
+ : (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
13
16
  await args.driver.$(xpathPath).clearValue();
14
17
  const ffElementNumber = `Fire-Flink-${ffNumber}`;
15
18
  (0, appendScriptData_js_1.appendScriptData)({
@@ -3,14 +3,17 @@ 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 getHelper_js_1 = require("../../../../utils/helpers/getHelper.js");
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) {
10
10
  case "android":
11
11
  case "ios":
12
12
  try {
13
- const { ffNumber, xpathPath } = (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
13
+ const isWebView = args.pageDOM?.includes("ff-inspect");
14
+ const { ffNumber, xpathPath } = isWebView
15
+ ? (0, enterActionHelper_js_1.enterActionHelper)(args.pageDOM, args.fireflinkIndex)
16
+ : (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
14
17
  const element = args.driver.$(xpathPath);
15
18
  await element.clearValue();
16
19
  await element.setValue(args.value);
@@ -27,7 +30,7 @@ async function clearAndEnter(args) {
27
30
  selector: args.selector,
28
31
  platform: args.platform
29
32
  });
30
- (0, getHelper_js_1.saveStepInputData)(args, args.value);
33
+ (0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
31
34
  }
32
35
  catch (error) {
33
36
  args.scriptDataAppender.setErrorNLP(nlpName);
@@ -54,7 +57,7 @@ async function clearAndEnter(args) {
54
57
  selector: xpathPath,
55
58
  platform: args.platform
56
59
  });
57
- (0, getHelper_js_1.saveStepInputData)(args, args.value);
60
+ (0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
58
61
  }
59
62
  catch (error) {
60
63
  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 getHelper_js_1 = require("../../../../utils/helpers/getHelper.js");
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 regex;
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
- regex = otpResult.regex;
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
  }
@@ -46,11 +46,11 @@ async function GetOtpAction(args) {
46
46
  (0, appendScriptData_js_1.appendScriptData)({
47
47
  scriptDataAppender: args.scriptDataAppender,
48
48
  nlpName: "MOB_FetchOtpFromMessages",
49
- stepInputs: [existingSms.address, timeFrom + "s", waitTime],
49
+ stepInputs: [existingSms.address, timeFrom + "s", waitTime, _regex],
50
50
  platform: "android",
51
51
  returnTypeVariableName: args.returnTypeVariableName
52
52
  });
53
- (0, getHelper_js_1.saveStepInputData)(args, otpValue || smsBody);
53
+ (0, saveStepInputData_js_1.saveStepInputData)(args, otpValue || smsBody);
54
54
  return;
55
55
  }
56
56
  const baselineId = existingSms?.id;
@@ -84,11 +84,11 @@ async function GetOtpAction(args) {
84
84
  (0, appendScriptData_js_1.appendScriptData)({
85
85
  scriptDataAppender: args.scriptDataAppender,
86
86
  nlpName: "MOB_FetchOtpFromMessages",
87
- stepInputs: [latestSms.address, timeFrom + "s", waitTime],
87
+ stepInputs: [latestSms.address, timeFrom + "s", waitTime, regex],
88
88
  platform: "android",
89
89
  returnTypeVariableName: args.returnTypeVariableName
90
90
  });
91
- (0, getHelper_js_1.saveStepInputData)(args, otpValue || smsBody);
91
+ (0, saveStepInputData_js_1.saveStepInputData)(args, otpValue || smsBody);
92
92
  return;
93
93
  }
94
94
  await new Promise((resolve) => setTimeout(resolve, 2000));
@@ -4,10 +4,13 @@ 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 getHelper_js_1 = require("../../../../utils/helpers/getHelper.js");
7
+ const saveStepInputData_js_1 = require("../../../../utils/helpers/saveStepInputData.js");
8
8
  async function MOB_EnterInputIntoElementFromClipBoard(args) {
9
9
  try {
10
- const { ffNumber, xpathPath } = (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
10
+ const isWebView = args.pageDOM?.includes("ff-inspect");
11
+ const { ffNumber, xpathPath } = isWebView
12
+ ? (0, enterActionHelper_js_1.enterActionHelper)(args.pageDOM, args.fireflinkIndex)
13
+ : (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
11
14
  const element = await args.driver.$(xpathPath);
12
15
  const base64Value = await args.driver.getClipboard('plaintext');
13
16
  const value = Buffer.from(base64Value, 'base64').toString('utf-8');
@@ -26,7 +29,7 @@ async function MOB_EnterInputIntoElementFromClipBoard(args) {
26
29
  selector: args.selector,
27
30
  platform: args.platform
28
31
  });
29
- (0, getHelper_js_1.saveStepInputData)(args, value);
32
+ (0, saveStepInputData_js_1.saveStepInputData)(args, value);
30
33
  }
31
34
  catch (error) {
32
35
  args.scriptDataAppender.setErrorNLP("MOB_EnterInputIntoElementFromClipBoard");
@@ -37,14 +37,17 @@ 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 getHelper_js_1 = require("../../../../utils/helpers/getHelper.js");
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) {
44
44
  case "android":
45
45
  case "ios":
46
46
  try {
47
- const { ffNumber, xpathPath } = (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
47
+ const isWebView = args.pageDOM?.includes("ff-inspect");
48
+ const { ffNumber, xpathPath } = isWebView
49
+ ? (0, enterActionHelper_js_1.enterActionHelper)(args.pageDOM, args.fireflinkIndex)
50
+ : (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
48
51
  const element = await args.driver.$(xpathPath);
49
52
  if (args.stepIndex + 1 < args.filteredSteps.length &&
50
53
  args.filteredSteps[args.stepIndex].toLowerCase().includes("enter")) {
@@ -54,7 +57,7 @@ async function enterInput(args) {
54
57
  else {
55
58
  await element.setValue(args.value);
56
59
  }
57
- if (args.platform === "android") {
60
+ if (args.platform === "android" && !isWebView) {
58
61
  try {
59
62
  const text = await element.getAttribute("text");
60
63
  if (text !== args.value) {
@@ -79,7 +82,7 @@ async function enterInput(args) {
79
82
  selector: args.selector,
80
83
  platform: args.platform
81
84
  });
82
- (0, getHelper_js_1.saveStepInputData)(args, args.value);
85
+ (0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
83
86
  }
84
87
  catch (error) {
85
88
  args.scriptDataAppender.setErrorNLP(nlpName);
@@ -111,7 +114,7 @@ async function enterInput(args) {
111
114
  selector: xpathPath,
112
115
  platform: args.platform
113
116
  });
114
- (0, getHelper_js_1.saveStepInputData)(args, args.value);
117
+ (0, saveStepInputData_js_1.saveStepInputData)(args, args.value);
115
118
  }
116
119
  catch (error) {
117
120
  args.scriptDataAppender.setErrorNLP("SendKeys");
@@ -3,12 +3,15 @@ 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 getHelper_js_1 = require("../../../../utils/helpers/getHelper.js");
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":
10
10
  try {
11
- const { ffNumber, xpathPath } = (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
11
+ const isWebView = args.pageDOM?.includes("ff-inspect");
12
+ const { ffNumber, xpathPath } = isWebView
13
+ ? (0, enterActionHelper_js_1.enterActionHelper)(args.pageDOM, args.fireflinkIndex)
14
+ : (0, enterActionHelper_js_1.enterActionHelperMob)(args.pageDOM, args.fireflinkIndex);
12
15
  const element = await args.driver.$(xpathPath);
13
16
  const parts = String(args.value).split(",");
14
17
  const inputValue = parts[0]?.trim() || "";
@@ -54,7 +57,7 @@ async function enterInputAndPress(args) {
54
57
  selector: args.selector,
55
58
  platform: args.platform
56
59
  });
57
- (0, getHelper_js_1.saveStepInputData)(args, inputValue || args.value);
60
+ (0, saveStepInputData_js_1.saveStepInputData)(args, inputValue || args.value);
58
61
  }
59
62
  catch (error) {
60
63
  args.scriptDataAppender.setErrorNLP("MOB_EnterDataAndPressKey");
@@ -109,7 +112,7 @@ async function enterInputAndPress(args) {
109
112
  selector: xpathPath,
110
113
  platform: args.platform
111
114
  });
112
- (0, getHelper_js_1.saveStepInputData)(args, inputValue || args.value);
115
+ (0, saveStepInputData_js_1.saveStepInputData)(args, inputValue || args.value);
113
116
  }
114
117
  catch (error) {
115
118
  args.scriptDataAppender.setErrorNLP("EnterDataAndPressKey");