ff-automationv2 2.2.29 → 2.2.31

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 (113) hide show
  1. package/dist/ai/llmcalls/llmAction.js +49 -13
  2. package/dist/ai/llmcalls/parseLlmOputput.js +5 -5
  3. package/dist/ai/llmprompts/promptRegistry.js +4 -0
  4. package/dist/ai/llmprompts/systemPrompts/actionExtractorPrompt.js +39 -11
  5. package/dist/ai/llmprompts/systemPrompts/fireflinkElementIndexExtactors.js +6 -6
  6. package/dist/ai/llmprompts/systemPrompts/fireflinkElementIndexExtractor_Mob.js +32 -0
  7. package/dist/ai/llmprompts/systemPrompts/mobileKeywordExtractor.js +17 -8
  8. package/dist/ai/llmprompts/systemPrompts/otpExtractorPrompt.d.ts +1 -0
  9. package/dist/ai/llmprompts/systemPrompts/otpExtractorPrompt.js +22 -0
  10. package/dist/ai/llmprompts/systemPrompts/verifyActionExtractorPrompt.js +3 -1
  11. package/dist/ai/llmprompts/systemPrompts/visionPrompt.js +14 -6
  12. package/dist/ai/llmprompts/systemPrompts/visionPromptMobile.js +3 -0
  13. package/dist/ai/llmprompts/userPrompts/userPrompt.js +1 -0
  14. package/dist/automation/actions/executor.d.ts +4 -0
  15. package/dist/automation/actions/executor.js +20 -0
  16. package/dist/automation/actions/interaction/clear/clear.js +1 -1
  17. package/dist/automation/actions/interaction/clear/clearAndEnter.js +1 -1
  18. package/dist/automation/actions/interaction/click/click.js +10 -3
  19. package/dist/automation/actions/interaction/click/clickNtimes.js +1 -1
  20. package/dist/automation/actions/interaction/click/doubleClick.js +1 -1
  21. package/dist/automation/actions/interaction/click/rightClick.js +1 -1
  22. package/dist/automation/actions/interaction/elementlessActions/getOtp.d.ts +2 -0
  23. package/dist/automation/actions/interaction/elementlessActions/getOtp.js +101 -0
  24. package/dist/automation/actions/interaction/enterActions/enterInput.js +11 -6
  25. package/dist/automation/actions/interaction/enterActions/enterInputAndPress.js +2 -2
  26. package/dist/automation/actions/interaction/enterActions/enterusingJs.js +2 -2
  27. package/dist/automation/actions/interaction/enterActions/waitAndEnter.js +1 -1
  28. package/dist/automation/actions/interaction/upload/uploadfile.js +1 -1
  29. package/dist/automation/actions/interaction/verify/VerifyNavigateURL.js +38 -11
  30. package/dist/automation/actions/interface/FireFlinkResponseSchema.d.ts +12 -0
  31. package/dist/automation/actions/interface/FireFlinkResponseSchema.js +19 -3
  32. package/dist/automation/actions/interface/getOtpInterface.d.ts +15 -0
  33. package/dist/automation/actions/interface/getOtpInterface.js +2 -0
  34. package/dist/automation/browserSession/initiateBrowserSession.d.ts +1 -1
  35. package/dist/automation/browserSession/initiateBrowserSession.js +15 -7
  36. package/dist/automation/driverState.d.ts +2 -0
  37. package/dist/automation/driverState.js +4 -0
  38. package/dist/automation/mobileSession/initiateMobileSession.d.ts +4 -5
  39. package/dist/automation/mobileSession/initiateMobileSession.js +83 -19
  40. package/dist/core/constants/allAction.js +5 -1
  41. package/dist/core/constants/supportedActions.js +5 -2
  42. package/dist/core/interfaces/actionInterface.d.ts +4 -0
  43. package/dist/core/interfaces/browserConfigurationInterface.d.ts +0 -4
  44. package/dist/core/interfaces/browserConfigurationInterface.js +0 -1
  45. package/dist/core/interfaces/executionDetails.d.ts +6 -3
  46. package/dist/core/interfaces/fireflinkScriptPayloadInterface.d.ts +22 -16
  47. package/dist/core/interfaces/llmResponseInterface.d.ts +1 -0
  48. package/dist/core/interfaces/promptInterface.d.ts +1 -0
  49. package/dist/core/main/SessionManager.d.ts +9 -0
  50. package/dist/core/main/SessionManager.js +23 -0
  51. package/dist/core/main/actionHandlerFactory.js +261 -64
  52. package/dist/core/main/executionContext.d.ts +7 -1
  53. package/dist/core/main/executionContext.js +94 -3
  54. package/dist/core/main/runAutomationScript.d.ts +1 -0
  55. package/dist/core/main/runAutomationScript.js +912 -304
  56. package/dist/core/main/stepProcessor.js +7 -2
  57. package/dist/core/types/browserType.d.ts +3 -3
  58. package/dist/core/types/browserType.js +2 -2
  59. package/dist/core/types/messageType.d.ts +13 -0
  60. package/dist/core/types/messageType.js +15 -0
  61. package/dist/core/types/promptType.d.ts +2 -1
  62. package/dist/core/types/promptType.js +1 -0
  63. package/dist/domAnalysis/searchBest.js +15 -16
  64. package/dist/domAnalysis/simplifyAndFlatten.js +6 -4
  65. package/dist/fireflinkData/fireflinkLocators/getListOfLocators.d.ts +3 -0
  66. package/dist/fireflinkData/fireflinkLocators/getListOfLocators.js +23 -15
  67. package/dist/fireflinkData/fireflinkLocators/parser/getElementsFromHTML.d.ts +3 -3
  68. package/dist/fireflinkData/fireflinkLocators/parser/getElementsFromHTML.js +134 -118
  69. package/dist/fireflinkData/fireflinkLocators/types/locator.d.ts +11 -1
  70. package/dist/fireflinkData/fireflinkLocators/utils/androidSelector.d.ts +1 -1
  71. package/dist/fireflinkData/fireflinkLocators/utils/androidSelector.js +35 -9
  72. package/dist/fireflinkData/fireflinkLocators/utils/cssSelector.d.ts +10 -10
  73. package/dist/fireflinkData/fireflinkLocators/utils/cssSelector.js +56 -59
  74. package/dist/fireflinkData/fireflinkLocators/utils/iosSelector.d.ts +1 -1
  75. package/dist/fireflinkData/fireflinkLocators/utils/iosSelector.js +53 -29
  76. package/dist/fireflinkData/fireflinkLocators/utils/referenceXpath.d.ts +8 -8
  77. package/dist/fireflinkData/fireflinkLocators/utils/referenceXpath.js +113 -190
  78. package/dist/fireflinkData/fireflinkLocators/utils/xpath.d.ts +17 -26
  79. package/dist/fireflinkData/fireflinkLocators/utils/xpath.js +314 -786
  80. package/dist/fireflinkData/fireflinkLocators/utils/xpathHelpers.d.ts +68 -70
  81. package/dist/fireflinkData/fireflinkLocators/utils/xpathHelpers.js +498 -517
  82. package/dist/fireflinkData/fireflinkScript/appendScriptData.d.ts +1 -1
  83. package/dist/fireflinkData/fireflinkScript/appendScriptData.js +5 -8
  84. package/dist/fireflinkData/fireflinkScript/scriptGenrationData.d.ts +2 -2
  85. package/dist/fireflinkData/fireflinkScript/scriptGenrationData.js +17 -27
  86. package/dist/llmConfig/llmConfiguration.js +13 -6
  87. package/dist/service/api/fireflinkApi.service.d.ts +1 -1
  88. package/dist/service/api/fireflinkApi.service.js +1 -2
  89. package/dist/service/fireflink.service.d.ts +3 -3
  90. package/dist/service/fireflink.service.js +23 -21
  91. package/dist/service/kafka/fireflinkKafka.service.d.ts +1 -2
  92. package/dist/service/kafka/fireflinkKafka.service.js +6 -4
  93. package/dist/tests/test12.d.ts +0 -1
  94. package/dist/tests/test12.js +65 -78
  95. package/dist/tests/testkaf.d.ts +0 -1
  96. package/dist/tests/testkaf.js +51 -55
  97. package/dist/utils/InstancesDetails/getInstancesInfo.js +1 -1
  98. package/dist/utils/browserCap/capability.d.ts +5 -1
  99. package/dist/utils/browserCap/capability.js +91 -15
  100. package/dist/utils/helpers/domSanitizer.d.ts +1 -0
  101. package/dist/utils/helpers/domSanitizer.js +9 -0
  102. package/dist/utils/helpers/enterActionHelper.js +23 -4
  103. package/dist/utils/helpers/xpathcreation.js +2 -2
  104. package/dist/utils/javascript/jsFindElement.d.ts +1 -1
  105. package/dist/utils/javascript/jsFindElement.js +2 -2
  106. package/dist/utils/newTab/newTabTracker.js +18 -6
  107. package/dist/utils/workers/LocatorWorkerInterface.d.ts +22 -0
  108. package/dist/utils/workers/LocatorWorkerInterface.js +2 -0
  109. package/dist/utils/workers/LocatorWorkerPool.d.ts +13 -0
  110. package/dist/utils/workers/LocatorWorkerPool.js +89 -0
  111. package/dist/utils/workers/locatorWorker.d.ts +1 -0
  112. package/dist/utils/workers/locatorWorker.js +44 -0
  113. package/package.json +3 -1
@@ -1,38 +1,29 @@
1
1
  import { platform } from "../../../core/types/scriptTypesType";
2
- export declare const generateIndexedXpaths: (element: Element, docmt: Document, platform: platform) => {
3
- key: string;
4
- value: string;
5
- }[];
6
- declare function getXPathUsingAttributeAndText(attributes: Attr[], targetElemt: HTMLElement | Element, docmt: Document, isTarget: boolean): string | undefined;
7
- export declare const attributesBasedXPath: (attr: Attr, targetElemt: HTMLElement | Element, docmt: Document, isIndex: boolean, isTarget: boolean, platform: platform) => string | undefined;
8
- export declare const getUniqueClassName: (element: HTMLElement | Element, docmt: Document, isIndex: boolean, isTarget: boolean, platform: platform) => string | undefined;
9
- export declare const getTextXPath: (element: HTMLElement | Element, docmt: Document, isIndex: boolean, isTarget: boolean, platform: platform) => string | undefined;
10
- export declare const parseDOM: (element: HTMLElement | Element, doc: Document, isIndex: boolean, isTarget: boolean, includedAttributes: Attr[] | undefined, strategies: string[] | undefined, platform: platform) => {
2
+ declare function getAiXPathUsingAttributeAndText(attributes: Attr[], targetElemt: HTMLElement | Element, docmt: Document, isTarget: boolean): string | undefined;
3
+ export declare const attributesAiBasedXPath: (attr: Attr, targetElemt: HTMLElement | Element, docmt: Document, isTarget: boolean, platform: platform) => string | undefined;
4
+ export declare const getAiUniqueClassName: (element: HTMLElement | Element, docmt: Document, isTarget: boolean, platform: platform) => string | undefined;
5
+ export declare const getAiTextXPath: (element: HTMLElement | Element, docmt: Document, isTarget: boolean, platform: platform) => string | undefined;
6
+ export declare const aiParseDOM: (element: HTMLElement | Element, doc: Document, isTarget: boolean, includedAttributes: Attr[] | undefined, platform: platform) => {
11
7
  key: string;
12
8
  value: string;
13
9
  }[];
14
10
  declare const xpath: {
15
- parseDOM: (element: HTMLElement | Element, doc: Document, isIndex: boolean, isTarget: boolean, includedAttributes: Attr[] | undefined, strategies: string[] | undefined, platform: platform) => {
11
+ aiParseDOM: (element: HTMLElement | Element, doc: Document, isTarget: boolean, includedAttributes: Attr[] | undefined, platform: platform) => {
16
12
  key: string;
17
13
  value: string;
18
14
  }[];
19
- getTextXPath: (element: HTMLElement | Element, docmt: Document, isIndex: boolean, isTarget: boolean, platform: platform) => string | undefined;
20
- getUniqueClassName: (element: HTMLElement | Element, docmt: Document, isIndex: boolean, isTarget: boolean, platform: platform) => string | undefined;
21
- attributesBasedXPath: (attr: Attr, targetElemt: HTMLElement | Element, docmt: Document, isIndex: boolean, isTarget: boolean, platform: platform) => string | undefined;
22
- addAllXPathAttributes: (attributes: Attr[], targetElemt: HTMLElement | Element, docmt: Document, isIndex: boolean, isTarget: boolean, platform: platform) => void;
23
- addRelativeXpaths: (targetElemt: HTMLElement | Element, docmt: Document, isIndex: boolean, isTarget: boolean, attribute: Attr[], platform: platform) => {
15
+ getAiTextXPath: (element: HTMLElement | Element, docmt: Document, isTarget: boolean, platform: platform) => string | undefined;
16
+ getAiUniqueClassName: (element: HTMLElement | Element, docmt: Document, isTarget: boolean, platform: platform) => string | undefined;
17
+ attributesAiBasedXPath: (attr: Attr, targetElemt: HTMLElement | Element, docmt: Document, isTarget: boolean, platform: platform) => string | undefined;
18
+ addAiAllXPathAttributes: (attributes: Attr[], targetElemt: HTMLElement | Element, docmt: Document, isTarget: boolean, platform: platform) => void;
19
+ getAiXPathUsingAttributeAndText: typeof getAiXPathUsingAttributeAndText;
20
+ getAiSiblingRelativeXPath: (domNode: HTMLElement | Element, docmt: Document, isTarget: boolean, nodeXpath: string, platform: platform) => {
24
21
  key: string;
25
22
  value: string;
26
- }[] | undefined;
27
- getXPathUsingAttributeAndText: typeof getXPathUsingAttributeAndText;
28
- getSiblingRelativeXPath: (domNode: HTMLElement | Element, docmt: Document, isTarget: boolean, nodeXpath: string, platform: platform) => null | undefined;
29
- getChildRelativeXpath: (domNode: HTMLElement | Element, docmt: Document, node: HTMLElement | Element) => string | null;
30
- getParentRelativeXpath: (domNode: HTMLElement, docmt: Document, node: HTMLElement | Element, isTarget: boolean, platform: platform) => any;
31
- getUniqueParentXpath: (domNode: HTMLElement, docmt: Document, node: HTMLElement | Element, isTarget: boolean, nodeXpath: string, isIndex: boolean, platform: platform) => any;
32
- checkRelativeXpathRelation: (nodeXpath1: string, nodeXpath2: string, targetElemt: HTMLElement | Element, docmt: Document, isIndex: boolean, relationType: string) => string | null;
33
- buildAxesStrategyXpaths: (element: HTMLElement | Element, docmt: Document, isTarget: boolean, isIndex: boolean, platform: platform) => {
34
- key: string;
35
- value: string;
36
- }[];
23
+ }[] | null | undefined;
24
+ getAiChildRelativeXpath: (domNode: HTMLElement | Element, docmt: Document, node: HTMLElement | Element) => string | null;
25
+ getAiParentRelativeXpath: (domNode: HTMLElement, docmt: Document, node: HTMLElement | Element, isTarget: boolean, _platform: platform) => any;
26
+ getAiUniqueParentXpath: (domNode: HTMLElement, docmt: Document, node: HTMLElement | Element, isTarget: boolean, nodeXpath: string, _platform: platform) => any;
27
+ checkAiRelativeXpathRelation: (nodeXpath1: string, nodeXpath2: string, targetElemt: HTMLElement | Element, docmt: Document, relationType: string) => string | null | undefined;
37
28
  };
38
29
  export default xpath;