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.
- package/dist/ai/llmcalls/llmAction.js +49 -13
- package/dist/ai/llmcalls/parseLlmOputput.js +5 -5
- package/dist/ai/llmprompts/promptRegistry.js +4 -0
- package/dist/ai/llmprompts/systemPrompts/actionExtractorPrompt.js +39 -11
- package/dist/ai/llmprompts/systemPrompts/fireflinkElementIndexExtactors.js +6 -6
- package/dist/ai/llmprompts/systemPrompts/fireflinkElementIndexExtractor_Mob.js +32 -0
- package/dist/ai/llmprompts/systemPrompts/mobileKeywordExtractor.js +17 -8
- package/dist/ai/llmprompts/systemPrompts/otpExtractorPrompt.d.ts +1 -0
- package/dist/ai/llmprompts/systemPrompts/otpExtractorPrompt.js +22 -0
- package/dist/ai/llmprompts/systemPrompts/verifyActionExtractorPrompt.js +3 -1
- package/dist/ai/llmprompts/systemPrompts/visionPrompt.js +14 -6
- package/dist/ai/llmprompts/systemPrompts/visionPromptMobile.js +3 -0
- package/dist/ai/llmprompts/userPrompts/userPrompt.js +1 -0
- package/dist/automation/actions/executor.d.ts +4 -0
- package/dist/automation/actions/executor.js +20 -0
- package/dist/automation/actions/interaction/clear/clear.js +1 -1
- package/dist/automation/actions/interaction/clear/clearAndEnter.js +1 -1
- package/dist/automation/actions/interaction/click/click.js +10 -3
- package/dist/automation/actions/interaction/click/clickNtimes.js +1 -1
- package/dist/automation/actions/interaction/click/doubleClick.js +1 -1
- package/dist/automation/actions/interaction/click/rightClick.js +1 -1
- package/dist/automation/actions/interaction/elementlessActions/getOtp.d.ts +2 -0
- package/dist/automation/actions/interaction/elementlessActions/getOtp.js +101 -0
- package/dist/automation/actions/interaction/enterActions/enterInput.js +11 -6
- package/dist/automation/actions/interaction/enterActions/enterInputAndPress.js +2 -2
- package/dist/automation/actions/interaction/enterActions/enterusingJs.js +2 -2
- package/dist/automation/actions/interaction/enterActions/waitAndEnter.js +1 -1
- package/dist/automation/actions/interaction/upload/uploadfile.js +1 -1
- package/dist/automation/actions/interaction/verify/VerifyNavigateURL.js +38 -11
- package/dist/automation/actions/interface/FireFlinkResponseSchema.d.ts +12 -0
- package/dist/automation/actions/interface/FireFlinkResponseSchema.js +19 -3
- package/dist/automation/actions/interface/getOtpInterface.d.ts +15 -0
- package/dist/automation/actions/interface/getOtpInterface.js +2 -0
- package/dist/automation/browserSession/initiateBrowserSession.d.ts +1 -1
- package/dist/automation/browserSession/initiateBrowserSession.js +15 -7
- package/dist/automation/driverState.d.ts +2 -0
- package/dist/automation/driverState.js +4 -0
- package/dist/automation/mobileSession/initiateMobileSession.d.ts +4 -5
- package/dist/automation/mobileSession/initiateMobileSession.js +83 -19
- package/dist/core/constants/allAction.js +5 -1
- package/dist/core/constants/supportedActions.js +5 -2
- package/dist/core/interfaces/actionInterface.d.ts +4 -0
- package/dist/core/interfaces/browserConfigurationInterface.d.ts +0 -4
- package/dist/core/interfaces/browserConfigurationInterface.js +0 -1
- package/dist/core/interfaces/executionDetails.d.ts +6 -3
- package/dist/core/interfaces/fireflinkScriptPayloadInterface.d.ts +22 -16
- package/dist/core/interfaces/llmResponseInterface.d.ts +1 -0
- package/dist/core/interfaces/promptInterface.d.ts +1 -0
- package/dist/core/main/SessionManager.d.ts +9 -0
- package/dist/core/main/SessionManager.js +23 -0
- package/dist/core/main/actionHandlerFactory.js +261 -64
- package/dist/core/main/executionContext.d.ts +7 -1
- package/dist/core/main/executionContext.js +94 -3
- package/dist/core/main/runAutomationScript.d.ts +1 -0
- package/dist/core/main/runAutomationScript.js +912 -304
- package/dist/core/main/stepProcessor.js +7 -2
- package/dist/core/types/browserType.d.ts +3 -3
- package/dist/core/types/browserType.js +2 -2
- package/dist/core/types/messageType.d.ts +13 -0
- package/dist/core/types/messageType.js +15 -0
- package/dist/core/types/promptType.d.ts +2 -1
- package/dist/core/types/promptType.js +1 -0
- package/dist/domAnalysis/searchBest.js +15 -16
- package/dist/domAnalysis/simplifyAndFlatten.js +6 -4
- package/dist/fireflinkData/fireflinkLocators/getListOfLocators.d.ts +3 -0
- package/dist/fireflinkData/fireflinkLocators/getListOfLocators.js +23 -15
- package/dist/fireflinkData/fireflinkLocators/parser/getElementsFromHTML.d.ts +3 -3
- package/dist/fireflinkData/fireflinkLocators/parser/getElementsFromHTML.js +134 -118
- package/dist/fireflinkData/fireflinkLocators/types/locator.d.ts +11 -1
- package/dist/fireflinkData/fireflinkLocators/utils/androidSelector.d.ts +1 -1
- package/dist/fireflinkData/fireflinkLocators/utils/androidSelector.js +35 -9
- package/dist/fireflinkData/fireflinkLocators/utils/cssSelector.d.ts +10 -10
- package/dist/fireflinkData/fireflinkLocators/utils/cssSelector.js +56 -59
- package/dist/fireflinkData/fireflinkLocators/utils/iosSelector.d.ts +1 -1
- package/dist/fireflinkData/fireflinkLocators/utils/iosSelector.js +53 -29
- package/dist/fireflinkData/fireflinkLocators/utils/referenceXpath.d.ts +8 -8
- package/dist/fireflinkData/fireflinkLocators/utils/referenceXpath.js +113 -190
- package/dist/fireflinkData/fireflinkLocators/utils/xpath.d.ts +17 -26
- package/dist/fireflinkData/fireflinkLocators/utils/xpath.js +314 -786
- package/dist/fireflinkData/fireflinkLocators/utils/xpathHelpers.d.ts +68 -70
- package/dist/fireflinkData/fireflinkLocators/utils/xpathHelpers.js +498 -517
- package/dist/fireflinkData/fireflinkScript/appendScriptData.d.ts +1 -1
- package/dist/fireflinkData/fireflinkScript/appendScriptData.js +5 -8
- package/dist/fireflinkData/fireflinkScript/scriptGenrationData.d.ts +2 -2
- package/dist/fireflinkData/fireflinkScript/scriptGenrationData.js +17 -27
- package/dist/llmConfig/llmConfiguration.js +13 -6
- package/dist/service/api/fireflinkApi.service.d.ts +1 -1
- package/dist/service/api/fireflinkApi.service.js +1 -2
- package/dist/service/fireflink.service.d.ts +3 -3
- package/dist/service/fireflink.service.js +23 -21
- package/dist/service/kafka/fireflinkKafka.service.d.ts +1 -2
- package/dist/service/kafka/fireflinkKafka.service.js +6 -4
- package/dist/tests/test12.d.ts +0 -1
- package/dist/tests/test12.js +65 -78
- package/dist/tests/testkaf.d.ts +0 -1
- package/dist/tests/testkaf.js +51 -55
- package/dist/utils/InstancesDetails/getInstancesInfo.js +1 -1
- package/dist/utils/browserCap/capability.d.ts +5 -1
- package/dist/utils/browserCap/capability.js +91 -15
- package/dist/utils/helpers/domSanitizer.d.ts +1 -0
- package/dist/utils/helpers/domSanitizer.js +9 -0
- package/dist/utils/helpers/enterActionHelper.js +23 -4
- package/dist/utils/helpers/xpathcreation.js +2 -2
- package/dist/utils/javascript/jsFindElement.d.ts +1 -1
- package/dist/utils/javascript/jsFindElement.js +2 -2
- package/dist/utils/newTab/newTabTracker.js +18 -6
- package/dist/utils/workers/LocatorWorkerInterface.d.ts +22 -0
- package/dist/utils/workers/LocatorWorkerInterface.js +2 -0
- package/dist/utils/workers/LocatorWorkerPool.d.ts +13 -0
- package/dist/utils/workers/LocatorWorkerPool.js +89 -0
- package/dist/utils/workers/locatorWorker.d.ts +1 -0
- package/dist/utils/workers/locatorWorker.js +44 -0
- package/package.json +3 -1
|
@@ -6,7 +6,7 @@ type EvalResult = {
|
|
|
6
6
|
first: Node | null;
|
|
7
7
|
second: Node | null;
|
|
8
8
|
};
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const clearAiXPathEvalCache: (node?: Node | null) => void;
|
|
10
10
|
type XPathIteratorResult = {
|
|
11
11
|
iterateNext: () => Node | null;
|
|
12
12
|
};
|
|
@@ -17,64 +17,64 @@ type XPathSnapshotResult = {
|
|
|
17
17
|
snapshotLength: number;
|
|
18
18
|
snapshotItem: (index: number) => Node | null;
|
|
19
19
|
};
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
23
|
-
export declare const
|
|
20
|
+
export declare function evaluateAiXPath(xpath: string, contextNode: Node, mode?: "iterator"): XPathIteratorResult;
|
|
21
|
+
export declare function evaluateAiXPath(xpath: string, contextNode: Node, mode: "first"): XPathFirstResult;
|
|
22
|
+
export declare function evaluateAiXPath(xpath: string, contextNode: Node, mode: "snapshot"): XPathSnapshotResult;
|
|
23
|
+
export declare const evaluateAIXPathOnce: (xpath: string, docmt: Node) => EvalResult;
|
|
24
24
|
export declare const modifiedElementAttributes: {
|
|
25
25
|
url: string | null;
|
|
26
26
|
attributeName: string | null;
|
|
27
27
|
element: HTMLElement | Element;
|
|
28
28
|
doc: Document;
|
|
29
29
|
}[];
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
35
|
-
export declare const
|
|
36
|
-
export declare const
|
|
37
|
-
export declare const
|
|
38
|
-
export declare const
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
30
|
+
export declare const sanitizeAiAttributeValue: (attributeName: string, attributeValue: string | null | undefined) => string;
|
|
31
|
+
export declare const isAiNumberExist: (str: string) => boolean;
|
|
32
|
+
export declare const buildAiPattern: (pattern: string, isAiSvg: boolean, tagName: string) => string;
|
|
33
|
+
export declare const getAiTextContent: (targetElement: HTMLElement | Element) => string;
|
|
34
|
+
export declare const getAiFilteredText: (element: Node) => string;
|
|
35
|
+
export declare const getAiCountOfXPath: (xpath: string, element: HTMLElement | Element, docmt: Node, multiElementReferenceMode?: boolean) => number;
|
|
36
|
+
export declare const escapeAiCharacters: (text: string) => string;
|
|
37
|
+
export declare const removeAiParenthesis: (xpath: string) => string;
|
|
38
|
+
export declare const findAiXpathWithIndex: (val: string, node: HTMLElement | Element, docmt: Node, count: number) => string | undefined;
|
|
39
|
+
export declare const aiReplaceWhiteSpaces: (str: string) => string;
|
|
40
|
+
export declare const getAiShadowRoot: (el: HTMLElement | Element) => Element | null;
|
|
41
|
+
export declare const createAIShadowEvaluationContext: (root: ShadowRoot, element?: HTMLElement | Element | (HTMLElement | Element)[]) => {
|
|
42
42
|
contextNode: HTMLDivElement;
|
|
43
43
|
cloneElement: Element | null;
|
|
44
44
|
cloneElements: (Element | null)[];
|
|
45
45
|
};
|
|
46
|
-
export declare const
|
|
46
|
+
export declare const checkAiBlockedAttributes: (attribute: {
|
|
47
47
|
name: string;
|
|
48
48
|
value: string;
|
|
49
49
|
}, targetElement: HTMLElement | Element, isTarget: boolean) => boolean;
|
|
50
|
-
export declare const
|
|
51
|
-
export declare const
|
|
52
|
-
export declare const
|
|
53
|
-
export declare const
|
|
54
|
-
export declare const
|
|
55
|
-
export declare const
|
|
56
|
-
export declare const
|
|
57
|
-
export declare const
|
|
58
|
-
export declare const
|
|
50
|
+
export declare const getAiRelationship: (a: HTMLElement, b: HTMLElement) => string;
|
|
51
|
+
export declare const isAiSvg: (element: Element | null | undefined) => boolean;
|
|
52
|
+
export declare const replaceAiTempAttributes: (str: string) => string;
|
|
53
|
+
export declare const getAiPropertyXPath: (element: HTMLElement | Element, docmt: Document, prop: string, value: string, isTarget: boolean, platform: platform) => string | undefined;
|
|
54
|
+
export declare const getAiAbsoluteXPath: (domNode: Element | null, docmt: Document) => string;
|
|
55
|
+
export declare const getAIRelativeXPath: (domNode: HTMLElement | Element, docmt: Document, _isTarget?: boolean, attributesArray?: Attr[], platform?: platform) => string | null;
|
|
56
|
+
export declare const getAiCombinationXpath: (attribute: Attr, domNode: HTMLElement | Element) => string | undefined;
|
|
57
|
+
export declare const getAiAttributeCombinationXpath: (domNode: HTMLElement | Element, docmt: Document | ShadowRoot, uniqueAttributes: Attr[], isTarget: boolean, platform: platform) => string | undefined;
|
|
58
|
+
export declare const intermediateAiXpathStep: (targetElemt: HTMLElement | Element, attr: {
|
|
59
59
|
name: string;
|
|
60
60
|
value: string;
|
|
61
61
|
}, isTarget: boolean) => string;
|
|
62
|
-
export declare const
|
|
63
|
-
export declare const
|
|
64
|
-
export declare const
|
|
65
|
-
export declare const
|
|
66
|
-
export declare const
|
|
67
|
-
export declare const
|
|
68
|
-
export declare const
|
|
69
|
-
export declare const
|
|
70
|
-
export declare const
|
|
71
|
-
export declare const
|
|
62
|
+
export declare const getAiFilteredTextXPath: (node: HTMLElement | Element) => string;
|
|
63
|
+
export declare const getAiNormalizedPropertyXPath: (element: HTMLElement | Element, prop: string, value: string, platform: platform) => string;
|
|
64
|
+
export declare const getAiStartsWithPropertyXPath: (element: HTMLElement | Element, prop: string, value: string, platform: platform) => string;
|
|
65
|
+
export declare const getAiContainsPropertyXPath: (element: HTMLElement | Element, prop: string, value: string, platform: platform) => string;
|
|
66
|
+
export declare const getOrAttributesAiXPath: (element: HTMLElement | Element, attributes: Attr[], platform: platform) => string;
|
|
67
|
+
export declare const getAiTagOnlyXPath: (element: HTMLElement | Element, platform: platform, docmt?: Document | ShadowRoot) => string;
|
|
68
|
+
export declare const getAiFirstMatchedNode: (xpath: string, docmt: Document | ShadowRoot) => HTMLElement | Element | null;
|
|
69
|
+
export declare const isAiExactUniqueXpath: (xpath: string, element: HTMLElement | Element, docmt: Document | ShadowRoot) => boolean;
|
|
70
|
+
export declare const getAiAxisNodeTest: (element: HTMLElement | Element, platform: platform) => string;
|
|
71
|
+
export declare const getAiUniqueNodeAnchorXpaths: (node: Element, docmt: Document | ShadowRoot, isTarget: boolean, platform: platform) => {
|
|
72
72
|
key: string;
|
|
73
73
|
value: string;
|
|
74
74
|
}[];
|
|
75
|
-
export declare const
|
|
76
|
-
export declare const
|
|
77
|
-
export declare const
|
|
75
|
+
export declare const getAiTextXpathFunction: (domNode: HTMLElement | Element) => string | undefined;
|
|
76
|
+
export declare const getAiXpathString: (node: HTMLElement | Element, attrName: string, attrValue: string) => string;
|
|
77
|
+
export declare const replaceAiActualAttributes: (str: string) => string;
|
|
78
78
|
export declare const getReferenceElementsXpath: (domNode: HTMLElement | Element, docmt: Document, isTarget: boolean, platform: platform) => {
|
|
79
79
|
key: string;
|
|
80
80
|
value: string;
|
|
@@ -82,35 +82,33 @@ export declare const getReferenceElementsXpath: (domNode: HTMLElement | Element,
|
|
|
82
82
|
export declare const normalizeXPath: (xpath: string) => string;
|
|
83
83
|
export declare const findMatchingParenthesis: (text: string, openPos: number) => number;
|
|
84
84
|
export declare function escapeAttrValue(value: string): string;
|
|
85
|
-
export declare function
|
|
86
|
-
export declare const getPlatformFallbackXpath: (element: Element, platform: platform) => string | null;
|
|
85
|
+
export declare function isAiUniqueInDOM(docmt: Document, name: string, value: string, element?: Element | null): boolean;
|
|
87
86
|
export declare const xpathUtils: {
|
|
88
87
|
getReferenceElementsXpath: (domNode: HTMLElement | Element, docmt: Document, isTarget: boolean, platform: platform) => {
|
|
89
88
|
key: string;
|
|
90
89
|
value: string;
|
|
91
90
|
}[];
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
getCountOfXPath: (xpath: string, element: HTMLElement | Element, docmt: Node, multiElementReferenceMode?: boolean) => number;
|
|
91
|
+
getAiAbsoluteXPath: (domNode: Element | null, docmt: Document) => string;
|
|
92
|
+
getAIRelativeXPath: (domNode: HTMLElement | Element, docmt: Document, _isTarget?: boolean, attributesArray?: Attr[], platform?: platform) => string | null;
|
|
93
|
+
getAiCombinationXpath: (attribute: Attr, domNode: HTMLElement | Element) => string | undefined;
|
|
94
|
+
getAiAttributeCombinationXpath: (domNode: HTMLElement | Element, docmt: Document | ShadowRoot, uniqueAttributes: Attr[], isTarget: boolean, platform: platform) => string | undefined;
|
|
95
|
+
isAiSvg: (element: Element | null | undefined) => boolean;
|
|
96
|
+
findAiXpathWithIndex: (val: string, node: HTMLElement | Element, docmt: Node, count: number) => string | undefined;
|
|
97
|
+
isAiNumberExist: (str: string) => boolean;
|
|
98
|
+
getAiTextContent: (targetElement: HTMLElement | Element) => string;
|
|
99
|
+
getAiCountOfXPath: (xpath: string, element: HTMLElement | Element, docmt: Node, multiElementReferenceMode?: boolean) => number;
|
|
102
100
|
normalizeXPath: (xpath: string) => string;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
getAiShadowRoot: (el: HTMLElement | Element) => Element | null;
|
|
102
|
+
escapeAiCharacters: (text: string) => string;
|
|
103
|
+
removeAiParenthesis: (xpath: string) => string;
|
|
104
|
+
checkAiBlockedAttributes: (attribute: {
|
|
107
105
|
name: string;
|
|
108
106
|
value: string;
|
|
109
107
|
}, targetElement: HTMLElement | Element, isTarget: boolean) => boolean;
|
|
110
|
-
|
|
108
|
+
getAiRelationship: (a: HTMLElement, b: HTMLElement) => string;
|
|
111
109
|
findMatchingParenthesis: (text: string, openPos: number) => number;
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
deleteAiGarbageFromInnerText: (a: string) => string;
|
|
111
|
+
replaceAiTempAttributes: (str: string) => string;
|
|
114
112
|
modifiedElementAttributes: {
|
|
115
113
|
url: string | null;
|
|
116
114
|
attributeName: string | null;
|
|
@@ -118,20 +116,20 @@ export declare const xpathUtils: {
|
|
|
118
116
|
doc: Document;
|
|
119
117
|
}[];
|
|
120
118
|
cspEnabled: boolean;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
119
|
+
getAiNormalizedPropertyXPath: (element: HTMLElement | Element, prop: string, value: string, platform: platform) => string;
|
|
120
|
+
getAiStartsWithPropertyXPath: (element: HTMLElement | Element, prop: string, value: string, platform: platform) => string;
|
|
121
|
+
getAiContainsPropertyXPath: (element: HTMLElement | Element, prop: string, value: string, platform: platform) => string;
|
|
122
|
+
getOrAttributesAiXPath: (element: HTMLElement | Element, attributes: Attr[], platform: platform) => string;
|
|
123
|
+
getAiTagOnlyXPath: (element: HTMLElement | Element, platform: platform, docmt?: Document | ShadowRoot) => string;
|
|
124
|
+
getAiFirstMatchedNode: (xpath: string, docmt: Document | ShadowRoot) => HTMLElement | Element | null;
|
|
125
|
+
isAiExactUniqueXpath: (xpath: string, element: HTMLElement | Element, docmt: Document | ShadowRoot) => boolean;
|
|
126
|
+
getAiAxisNodeTest: (element: HTMLElement | Element, platform: platform) => string;
|
|
127
|
+
getAiUniqueNodeAnchorXpaths: (node: Element, docmt: Document | ShadowRoot, isTarget: boolean, platform: platform) => {
|
|
130
128
|
key: string;
|
|
131
129
|
value: string;
|
|
132
130
|
}[];
|
|
133
131
|
escapeAttrValue: typeof escapeAttrValue;
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
isAiUniqueInDOM: typeof isAiUniqueInDOM;
|
|
133
|
+
sanitizeAiAttributeValue: (attributeName: string, attributeValue: string | null | undefined) => string;
|
|
136
134
|
};
|
|
137
135
|
export {};
|