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.
- package/dist/ai/llmprompts/llmPromptTypes/systemPromptTypes.d.ts +3 -0
- package/dist/ai/llmprompts/promptRegistry.js +4 -0
- package/dist/ai/llmprompts/systemPrompts/actionExtractorPrompt.js +16 -12
- package/dist/ai/llmprompts/systemPrompts/arithmeticPrompt.d.ts +2 -0
- package/dist/ai/llmprompts/systemPrompts/arithmeticPrompt.js +48 -0
- package/dist/ai/llmprompts/systemPrompts/getActionExtractorPrompt.js +1 -1
- package/dist/ai/llmprompts/systemPrompts/getActionExtractorPromptMob.js +1 -1
- package/dist/ai/llmprompts/systemPrompts/inputContextPrompt.js +2 -0
- package/dist/ai/llmprompts/systemPrompts/mobileKeywordExtractor.js +2 -2
- package/dist/ai/llmprompts/userPrompts/userPrompt.js +1 -0
- package/dist/automation/actions/executor.d.ts +1 -0
- package/dist/automation/actions/executor.js +25 -0
- package/dist/automation/actions/interaction/alert/enterDataToAlert.js +2 -2
- package/dist/automation/actions/interaction/alert/getTextPresentOnAlertPopup.js +2 -2
- package/dist/automation/actions/interaction/arithmetic/arithmeticOperations.d.ts +2 -0
- package/dist/automation/actions/interaction/arithmetic/arithmeticOperations.js +61 -0
- package/dist/automation/actions/interaction/clear/clear.js +4 -1
- package/dist/automation/actions/interaction/clear/clearAndEnter.js +7 -4
- package/dist/automation/actions/interaction/elementlessActions/getOtp.js +7 -7
- package/dist/automation/actions/interaction/enterActions/EnterInputIntoElementFromClipBoardInterface_mob.js +6 -3
- package/dist/automation/actions/interaction/enterActions/enterInput.js +8 -5
- package/dist/automation/actions/interaction/enterActions/enterInputAndPress.js +7 -4
- package/dist/automation/actions/interaction/enterActions/enterUrl.js +3 -3
- package/dist/automation/actions/interaction/enterActions/enterusingJs.js +2 -2
- package/dist/automation/actions/interaction/enterActions/waitAndEnter.js +7 -4
- package/dist/automation/actions/interaction/get/MOB_GetADBLogsForGivenAppPackage.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetAllContexts.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetAllWindowHandles.js +3 -3
- package/dist/automation/actions/interaction/get/MOB_GetAltitude.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetBatteryPercentage.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetBatteryStatus.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetClipBoardText.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentActivity.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentAppPackage.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentContext.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceDate.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceSettings.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceStatus.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceSystemBars.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentDeviceTime.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentOrientation.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetCurrentSessionId.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetDeviceLocation.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetDeviceName.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetDeviceOsVersion.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetDeviceUdid.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetHeightOfElement.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetHeightOfScreen.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetHourFromCurrentDeviceTime.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetLatitude.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetLongitude.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetMinuteFromCurrentDeviceTime.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetSecondFromCurrentDeviceTime.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetSizeOfScreen.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetSupportedPerformanceDataTypes.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetTextFromElementAndSetToClipBoard.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetWidthOfElement.js +2 -2
- package/dist/automation/actions/interaction/get/MOB_GetWidthOfScreen.js +2 -2
- package/dist/automation/actions/interaction/get/browserWindowGetPosition.js +2 -2
- package/dist/automation/actions/interaction/get/getAllBrokenImages.js +2 -2
- package/dist/automation/actions/interaction/get/getAllBrokenLinkCount.js +2 -2
- package/dist/automation/actions/interaction/get/getAllBrokenLinks.js +2 -2
- package/dist/automation/actions/interaction/get/getAllConsoleErrors.js +2 -2
- package/dist/automation/actions/interaction/get/getAllConsoleInformation.js +2 -2
- package/dist/automation/actions/interaction/get/getAllConsoleLogs.js +2 -2
- package/dist/automation/actions/interaction/get/getAllConsoleWarnings.js +2 -2
- package/dist/automation/actions/interaction/get/getAllCookieNames.js +2 -2
- package/dist/automation/actions/interaction/get/getAllCookieValues.js +2 -2
- package/dist/automation/actions/interaction/get/getAllSelectedOptions.js +2 -2
- package/dist/automation/actions/interaction/get/getAllTheOptionsFromListBoxAsText.js +2 -2
- package/dist/automation/actions/interaction/get/getAllTheOptionsFromListBoxAsTextInSortedOrder.js +2 -2
- package/dist/automation/actions/interaction/get/getAllTheSelectedOptionsFromListBoxAsText.js +2 -2
- package/dist/automation/actions/interaction/get/getAllWindowHandles.js +2 -2
- package/dist/automation/actions/interaction/get/getAttribute.js +3 -3
- package/dist/automation/actions/interaction/get/getAudioCurrentPlaybackRate.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioCurrentSeekTime.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioCurrentVolume.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioDecodedByte.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioDefaultPlaybackRate.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioMediaLength.js +2 -2
- package/dist/automation/actions/interaction/get/getAudioMediaSource.js +2 -2
- package/dist/automation/actions/interaction/get/getBestPracticesScore.js +2 -2
- package/dist/automation/actions/interaction/get/getBrowserCount.js +2 -2
- package/dist/automation/actions/interaction/get/getBrowserVersion.js +2 -2
- package/dist/automation/actions/interaction/get/getCapabilityNames.js +2 -2
- package/dist/automation/actions/interaction/get/getClipBoardText.js +2 -2
- package/dist/automation/actions/interaction/get/getCollectiveApiResponseTime.js +2 -2
- package/dist/automation/actions/interaction/get/getCollectiveApiStatusCode.js +2 -2
- package/dist/automation/actions/interaction/get/getCssValue.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentDayOfTheWeek.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSecondsFromCurrentSystemTime.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemDate.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemDay.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemMonth.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemTime.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentSystemYear.js +2 -2
- package/dist/automation/actions/interaction/get/getCurrentWindowHandle.js +2 -2
- package/dist/automation/actions/interaction/get/getDataFromApiRequestHeaderForJsonPath.js +2 -2
- package/dist/automation/actions/interaction/get/getDataFromApiResponseForJsonPath.js +2 -2
- package/dist/automation/actions/interaction/get/getDateWithGivenFormat.js +2 -2
- package/dist/automation/actions/interaction/get/getDriverInstance.js +2 -2
- package/dist/automation/actions/interaction/get/getFirstContentfulPaint.js +2 -2
- package/dist/automation/actions/interaction/get/getFirstSelectedOption.js +2 -2
- package/dist/automation/actions/interaction/get/getFullPaintTime.js +2 -2
- package/dist/automation/actions/interaction/get/getHTMLCodeOfPage.js +2 -2
- package/dist/automation/actions/interaction/get/getHeightOfBrowserWindow.js +2 -2
- package/dist/automation/actions/interaction/get/getHeightOfWebElement.js +2 -2
- package/dist/automation/actions/interaction/get/getHourFromCurrentSystemTime.js +2 -2
- package/dist/automation/actions/interaction/get/getImplicitTimeOut.js +2 -2
- package/dist/automation/actions/interaction/get/getLargestContentfulPaint.js +2 -2
- package/dist/automation/actions/interaction/get/getListBoxSize.js +2 -2
- package/dist/automation/actions/interaction/get/getListOfElementsFromLocatorTypeLocatorValue.js +3 -3
- package/dist/automation/actions/interaction/get/getLocation.js +3 -3
- package/dist/automation/actions/interaction/get/getMinuteFromCurrentSystemTime.js +2 -2
- package/dist/automation/actions/interaction/get/getNetworkRouteTime.js +2 -2
- package/dist/automation/actions/interaction/get/getNumberOfBrokenImages.js +2 -2
- package/dist/automation/actions/interaction/get/getNumberOfLinksPresentInCurrentPage.js +2 -2
- package/dist/automation/actions/interaction/get/getNumberOfWorkingLinksFromCurrentPage.js +2 -2
- package/dist/automation/actions/interaction/get/getOptions.js +2 -2
- package/dist/automation/actions/interaction/get/getPageTitle.js +2 -2
- package/dist/automation/actions/interaction/get/getPerformanceMetrics.js +2 -2
- package/dist/automation/actions/interaction/get/getPwaScore.js +2 -2
- package/dist/automation/actions/interaction/get/getRect.js +3 -3
- package/dist/automation/actions/interaction/get/getScreenshot.js +2 -2
- package/dist/automation/actions/interaction/get/getScreenshotAs.js +2 -2
- package/dist/automation/actions/interaction/get/getSeoScore.js +2 -2
- package/dist/automation/actions/interaction/get/getSingleApiRequestPayload.js +2 -2
- package/dist/automation/actions/interaction/get/getSingleApiResponse.js +2 -2
- package/dist/automation/actions/interaction/get/getSingleApiResponseTime.js +2 -2
- package/dist/automation/actions/interaction/get/getSingleApiStatusCode.js +2 -2
- package/dist/automation/actions/interaction/get/getSize.js +3 -3
- package/dist/automation/actions/interaction/get/getSizeOfBrowserWindow.js +2 -2
- package/dist/automation/actions/interaction/get/getStringDataFromLocalFile.js +2 -2
- package/dist/automation/actions/interaction/get/getSystemProperty.js +2 -2
- package/dist/automation/actions/interaction/get/getTagName.js +3 -3
- package/dist/automation/actions/interaction/get/getText.js +12 -5
- package/dist/automation/actions/interaction/get/getTheFirstSelectedOptionFromListBoxAsText.js +2 -2
- package/dist/automation/actions/interaction/get/getTotalNumberOfCookies.js +2 -2
- package/dist/automation/actions/interaction/get/getTunnelIdentifier.js +2 -2
- package/dist/automation/actions/interaction/get/getURLPresentInAddressBar.js +2 -2
- package/dist/automation/actions/interaction/get/getUserHomeDirectory.js +2 -2
- package/dist/automation/actions/interaction/get/getValueByCookieName.js +2 -2
- package/dist/automation/actions/interaction/get/getValueFromLocalStorage.js +2 -2
- package/dist/automation/actions/interaction/get/getValueOfSystemVariable.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoCurrentPlaybackRate.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoCurrentSeekTime.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoCurrentVolume.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoDecodedByte.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoDefaultPlaybackRate.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoMediaLength.js +2 -2
- package/dist/automation/actions/interaction/get/getVideoMediaSource.js +2 -2
- package/dist/automation/actions/interaction/get/getWidthOfBrowser.js +2 -2
- package/dist/automation/actions/interaction/get/getWidthOfWebElement.js +2 -2
- package/dist/automation/actions/interaction/get/getWorkingLinksFromCurrentPage.js +2 -2
- package/dist/automation/actions/interaction/get/getWrappedElement.js +2 -2
- package/dist/automation/actions/interaction/get/getWrappedOptionFromListBoxAsText.js +2 -2
- package/dist/automation/actions/interaction/get/getXLocationOfBrowserWindow.js +2 -2
- package/dist/automation/actions/interaction/get/getXLocationOfWebElement.js +3 -3
- package/dist/automation/actions/interaction/get/getYLocationOfBrowserWindow.js +2 -2
- package/dist/automation/actions/interaction/get/getYLocationOfWebElement.js +3 -3
- package/dist/automation/actions/interaction/iframe/switchToDefaultContent.js +1 -1
- package/dist/automation/actions/interaction/shadowDom/shadowDomEnter.js +2 -2
- package/dist/automation/actions/interaction/shadowDom/shadowDomGetText.js +2 -2
- package/dist/automation/actions/interaction/verify/VerifyElementNotContainsText.js +4 -1
- package/dist/automation/actions/interaction/verify/verifypartialtext.js +9 -2
- package/dist/automation/actions/interaction/verify/verifytext.js +9 -2
- package/dist/automation/actions/interface/FireFlinkResponseSchema.d.ts +13 -0
- package/dist/automation/actions/interface/FireFlinkResponseSchema.js +10 -1
- package/dist/automation/actions/interface/arithmeticActionInterface.d.ts +18 -0
- package/dist/automation/actions/interface/arithmeticActionInterface.js +2 -0
- package/dist/core/constants/allAction.js +2 -1
- package/dist/core/constants/supportedActions.js +2 -1
- package/dist/core/helpers/elementSelectorResolver.d.ts +1 -1
- package/dist/core/helpers/elementSelectorResolver.js +3 -2
- package/dist/core/helpers/runnerDomPipeline.d.ts +2 -2
- package/dist/core/helpers/runnerDomPipeline.js +20 -9
- package/dist/core/helpers/visionFallbackHandler.js +4 -4
- package/dist/core/interfaces/actionInterface.d.ts +2 -0
- package/dist/core/interfaces/automationRunnerInterface.d.ts +1 -0
- package/dist/core/interfaces/promptInterface.d.ts +3 -0
- package/dist/core/main/actionHandlerFactory.js +3 -0
- package/dist/core/main/runAutomationScript.js +53 -8
- package/dist/core/types/promptType.d.ts +2 -1
- package/dist/core/types/promptType.js +1 -0
- package/dist/fireflinkData/fireflinkLocators/getListOfLocators.d.ts +2 -1
- package/dist/fireflinkData/fireflinkLocators/getListOfLocators.js +2 -2
- package/dist/fireflinkData/fireflinkScript/appendScriptData.js +42 -6
- package/dist/fireflinkData/fireflinkScript/scriptGenrationData.d.ts +1 -0
- package/dist/fireflinkData/fireflinkScript/scriptGenrationData.js +1 -0
- package/dist/imageAnalysisWeb/annotateScreenshot.d.ts +1 -1
- package/dist/imageAnalysisWeb/annotateScreenshot.js +24 -10
- package/dist/imageAnalysisWeb/generateAnnotatedScreenshots.js +5 -2
- package/dist/tests/senario.d.ts +0 -0
- package/dist/tests/senario.js +1120 -0
- package/dist/tests/test12.d.ts +1 -0
- package/dist/tests/test12.js +34 -65
- package/dist/utils/DomExtraction/jsForAttributeInjection.js +23 -0
- package/dist/utils/helpers/xpathcreation.js +3 -0
- package/dist/utils/iframesExtraction/findElementUsingFF.js +1 -2
- package/dist/utils/iframesExtraction/switchToIframeByMeta.js +1 -1
- package/dist/utils/workers/locatorWorker.js +3 -1
- package/package.json +1 -1
- /package/dist/utils/helpers/{getHelper.d.ts → saveStepInputData.d.ts} +0 -0
- /package/dist/utils/helpers/{getHelper.js → saveStepInputData.js} +0 -0
package/dist/tests/test12.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tests/test12.js
CHANGED
|
@@ -1,66 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// projectId: "PJT1001",
|
|
37
|
-
// testCaseId: "SCR1208",
|
|
38
|
-
// promptId: "3f6e123c-8ec6-47c1-90e1-1a2f53b49251",
|
|
39
|
-
// userName: "default-user",
|
|
40
|
-
// appiumPort: 0,
|
|
41
|
-
// platformVersion: "",
|
|
42
|
-
// realDeviceId: "",
|
|
43
|
-
// isTerminate: false,
|
|
44
|
-
// isCloud: false,
|
|
45
|
-
// cloudConfig: {
|
|
46
|
-
// accessKey: "yfAa_w199cJge2Gezsgb2Jnu7hKdqER1tExY5kKvgSvXfi1lRUelFsbTFI5pMq7zQuwwNXXnsLTkjKhvWcKDWsUoGLi9KjUV6gbUNDhqj0jWYFyW9h_0LIDEg5qXigwZdqzQqAvWwHin3gBhzGndeROtixv_VFhnseGSWRAHTajZzE-Zl0d8BP6gl0TEBUfoNgqBtAQVDLP6wAQzPfcyjjGFsdHkXWeHFkKmA78D7rKlnNuN2WgjIUlhYheDRDeqZ98Ig_PyS1GbUvjwJ73L38sr_cD4Y9lrKyWJV-m5RmtKhmkqRM8uk5gEfjzgwy30",
|
|
47
|
-
// hostname: "devicefarm.fireflink.com",
|
|
48
|
-
// licenseId: "LIC1026612",
|
|
49
|
-
// projectName: "demo",
|
|
50
|
-
// protocol: "https",
|
|
51
|
-
// path: "backend/fireflinkcloud/wd/hub"
|
|
52
|
-
// },
|
|
53
|
-
// capabilities: {
|
|
54
|
-
// browserName: "chrome",
|
|
55
|
-
// platformName: "Windows 11",
|
|
56
|
-
// browserVersion: "146"
|
|
57
|
-
// },
|
|
58
|
-
// token: "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJNTnNvS1VYQkxLS3BPblpWUUxaZWhwcGhobHdJSldCYUF4dDRkaXMwNlcwIn0.eyJleHAiOjE3ODA0Njk3OTEsImlhdCI6MTc4MDM4MzM5MSwianRpIjoib25ydHJvOjc3YjJjZDNmLWQwOTMtNDA3Yy04ODk1LTVmMWQ3NTIyMjE3NSIsImlzcyI6Imh0dHBzOi8vYXBwLnYzLmZpcmVmbGluay5jb206MzAxMDEvcmVhbG1zL0ZpcmVGbGluayIsImF1ZCI6InRhcmdldC1jbGllbnQiLCJzdWIiOiJmOjg4OTI5YjAwLTczYjgtNDc0Zi1iYmJjLWRiMmUxYTNlMDc5ODpyYXNobWkudEBmaXJlZmxpbmsuY29tIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiZmxpbmstc2VydmljZSIsInNpZCI6ImUzNjE2MzFiLWJkMjItNGZiMS1hOWY1LTQ4YzU3MjQ0NWNhNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl19LCJzY29wZSI6InByb2ZpbGUgZW1haWwiLCJjdXJyZW50TGljZW5zZUlkIjoiTElDMjYxMTAiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImN1cnJlbnRQcml2aWxlZ2UiOiJBZG1pbiIsImZ1bGxOYW1lIjoiUmFzaG1pIiwiYWN0aXZhdGlvblN0YXR1cyI6IkFDVElWRSIsInByaXZpbGVnZSI6IkFkbWluIiwibGljZW5zZU5hbWUiOiJGaXJlZmxpbmtfQnVsay1MSUMyNjExMCIsInByZWZlcnJlZF91c2VybmFtZSI6IlJhc2htaSIsInVzZXJOYW1lIjoicmFzaG1pLnRAZmlyZWZsaW5rLmNvbSIsImJpbGxpbmdDeWNsZSI6IlllYXJseSIsImlkIjoiVVNSMTAxNTAzMTQiLCJsaWNlbnNlSWQiOiJMSUMyNjExMCIsImVtYWlsIjoicmFzaG1pLnRAZmlyZWZsaW5rLmNvbSJ9.RcOhUQMtDAd6LibDR0Iws5WWK4EwfgXiTWxn1GP-bHz3W4CFd1ap_LIzAFX2RLe2dbKpbhiVfDAdU7MmYt10wQdz3PArWVXolpBQWNJecJhibYZCp9dQwMvBiDBQ_5i6AS4K_PhDlpwXkh2o0vuBfrYu4jVl1vOPfbLodxq3Tj8SfngD8_1q0_CXKbmBTXmsVESs43f4XXT2T7wa6t2ErbIwW38FLur2UmLab3UnVYJdqv7fjkrBrGqQBMzLDeQZwAWmtAWpWFGf9dMWhJyBxu-Al88VOIVZVxDwVnXLMg-DeIv_H1lk8x2AlyG_WVxlFVRkWNTztKMvXtc2GXB5ug"
|
|
59
|
-
// })
|
|
60
|
-
// res.json({
|
|
61
|
-
// message: "User story received successfully",
|
|
62
|
-
// });
|
|
63
|
-
// });
|
|
64
|
-
// app.listen(3000, () => {
|
|
65
|
-
// console.log("Server running on port 3000");
|
|
66
|
-
// });
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
// import { verify } from "node:crypto";
|
|
7
|
+
const index_js_1 = require("../index.js");
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const fs_1 = __importDefault(require("fs"));
|
|
10
|
+
const certPath = path_1.default.join("D:", "Bitbucket", "ai-chat-backend", "Certificates", "V3keystore.jks");
|
|
11
|
+
const ssl = {
|
|
12
|
+
ca: [fs_1.default.readFileSync(certPath, "utf-8")],
|
|
13
|
+
rejectUnauthorized: false,
|
|
14
|
+
};
|
|
15
|
+
const runner = new index_js_1.AutomationRunner();
|
|
16
|
+
runner.run({
|
|
17
|
+
// hasMoreSteps: false,
|
|
18
|
+
userStory: [
|
|
19
|
+
["Launch the browser"],
|
|
20
|
+
["navigate to url https://www.indiamart.com"],
|
|
21
|
+
["wait for 20 seconds"],
|
|
22
|
+
["get otp from INDMRT message within 60 seconds and wait for 60 seconds"],
|
|
23
|
+
["Enter OTP into enter otp boxes"],
|
|
24
|
+
["wait for 10 seconds"],
|
|
25
|
+
["Close the browser"]
|
|
26
|
+
],
|
|
27
|
+
scenario: false,
|
|
28
|
+
sslConfig: ssl,
|
|
29
|
+
scriptType: "android",
|
|
30
|
+
broker: ["test3.fireflink.com:9092"], "scriptName": "script", "type": "Web & Mobile", "projectId": "PJT1006", "testCaseId": "SCR1806", kafkaMessageKey: 'lohit',
|
|
31
|
+
"promptId": "a8fba64a-4d91-422c-bdfd-a7609576a63e", "generatedBy": "", "webSocketId": "", "licenseType": "C-Professional", "licenseId": "LIC2026980", "userId": "USR26860", "projectType": "Web", "serverData": "https://performance.fireflink.com", "pageDetails": { "Web": { "pageId": "PAG3e09350f-4917-4c80-8ce5-a08e97fe314e", "pageName": "ai-Page" } }, "userName": "jai", isTerminate: false, "appiumPort": 4723, "realDeviceId": "", "browserName": "Google Chrome", "token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJIUlpZV2NoTURZWXVQaDF3TDkxb3drS3Q1OUtuNC1sOFRJcXF3a2RBV2pjIn0.eyJleHAiOjE3ODA1NzkwNzEsImlhdCI6MTc4MDQ5MjY3MSwianRpIjoib25ydHJvOmYxYzJiNjg2LTJiZGMtNGIxOS04ZGVhLTMwMjhhNDkxZDY5NCIsImlzcyI6Imh0dHA6Ly8xNDguNzIuMTY4LjE2OjMwMTA3L3JlYWxtcy9GaXJlRmxpbmstdGVzdDEiLCJhdWQiOiJ0YXJnZXQtY2xpZW50Iiwic3ViIjoiZjo4ODkyOWIwMC03M2I4LTQ3NGYtYmJiYy1kYjJlMWEzZTA3OTg6amFpYWthc2hAeW9wbWFpbC5jb20iLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJmbGluay1zZXJ2aWNlIiwic2lkIjoiZWRiMDgwZDctNzhiYi00NzU5LTgyM2EtMTM1ZDUzYTM5NmQzIiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6WyIiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInNjb3BlIjoicHJvZmlsZSBlbWFpbCIsImN1cnJlbnRMaWNlbnNlSWQiOiJMSUMzOTIyIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJjdXJyZW50UHJpdmlsZWdlIjoiQWRtaW4iLCJmdWxsTmFtZSI6ImphaSIsImFjdGl2YXRpb25TdGF0dXMiOiJBQ1RJVkUiLCJwcml2aWxlZ2UiOiJBZG1pbiIsImxpY2Vuc2VOYW1lIjoiRmlyZUZsaW5rIC0gTElDMzkyMnciLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJqYWkiLCJ1c2VyTmFtZSI6ImphaWFrYXNoQHlvcG1haWwuY29tIiwiYmlsbGluZ0N5Y2xlIjoiWWVhcmx5IiwiaWQiOiJVU1IyNjc1MiIsImxpY2Vuc2VJZCI6IkxJQzM5MjIiLCJlbWFpbCI6ImphaWFrYXNoQHlvcG1haWwuY29tIn0.LPBCnEKBi8Yi4Qktpd_oW46-P7s0iQ0AejZeXRMIa8aUwfwY8gNl3McIrKLBVqPL4NKYe_05aMaiepvjkolu7RWh120mX90ZdNJuMUjg0WuRaM90xNjmy1YK94mBt0mphKK04u1K4trvhvgW2hTt4rvGRq_oEvH2E_2YqYw310TuP-guqxuZqTv_IJ6HFtvMJkV9L3A579juICZfGdS53-KuZwqn7jA-73nJZBzPJyMucaPz42s36RWpDmfs7MX0-Fcv8LH7FvCjCs63GvCC-tdGoh5m0MRCiElJocWlw9jabsPHymEt5-nemnXIZIon2675wYbxVx99mHA1VBPD2w", "sessionPath": "session", "platform": "android", "platformVersion": "", "env": "test1",
|
|
32
|
+
"serverHost": "https://sg-app.fireflink.com", "adbPath": "C:\\FireFlinkClient\\resources\\bin\\win\\android-sdk\\platform-tools\\adb.exe",
|
|
33
|
+
topic: "test-topic",
|
|
34
|
+
aiExecutionAction: ""
|
|
35
|
+
});
|
|
@@ -136,6 +136,7 @@ async function getReactAnnotatedDOM(browser) {
|
|
|
136
136
|
path = framePath + path;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
+
path = path.replace(/\/div\[0\]\/div\[0\]/g, "/div[1]").replace(/\/div\[0\]/g, "/div[1]");
|
|
139
140
|
return path;
|
|
140
141
|
}
|
|
141
142
|
// ==========================================================
|
|
@@ -219,6 +220,27 @@ async function getReactAnnotatedDOM(browser) {
|
|
|
219
220
|
logData_js_1.logger.error("Attribute injection failed", error);
|
|
220
221
|
}
|
|
221
222
|
}
|
|
223
|
+
const voidElements = new Set([
|
|
224
|
+
"area",
|
|
225
|
+
"base",
|
|
226
|
+
"br",
|
|
227
|
+
"col",
|
|
228
|
+
"embed",
|
|
229
|
+
"hr",
|
|
230
|
+
"img",
|
|
231
|
+
"input",
|
|
232
|
+
"link",
|
|
233
|
+
"meta",
|
|
234
|
+
"param",
|
|
235
|
+
"source",
|
|
236
|
+
"track",
|
|
237
|
+
"wbr"
|
|
238
|
+
]);
|
|
239
|
+
// Void elements cannot have children or closing tags
|
|
240
|
+
if (voidElements.has(tag)) {
|
|
241
|
+
return html;
|
|
242
|
+
}
|
|
243
|
+
// Normal children
|
|
222
244
|
el.childNodes.forEach(child => {
|
|
223
245
|
html += serializeNode(child);
|
|
224
246
|
});
|
|
@@ -355,6 +377,7 @@ function isSelectRelated(node) {
|
|
|
355
377
|
path = framePath + path;
|
|
356
378
|
}
|
|
357
379
|
}
|
|
380
|
+
path = path.replace(/\/div\[0\]\/div\[0\]/g, "/div[1]").replace(/\/div\[0\]/g, "/div[1]");
|
|
358
381
|
return path;
|
|
359
382
|
}
|
|
360
383
|
function walk(root) {
|
|
@@ -32,6 +32,9 @@ function getWebXPathByFFIndex(annotatedDom, fireflinkIndex) {
|
|
|
32
32
|
}
|
|
33
33
|
function getFFIndexAndXPath(annotatedDom, fireflinkIndex, platform) {
|
|
34
34
|
try {
|
|
35
|
+
if (annotatedDom?.includes("ff-inspect")) {
|
|
36
|
+
return getWebXPathByFFIndex(annotatedDom, fireflinkIndex);
|
|
37
|
+
}
|
|
35
38
|
const parser = new xmldom_1.DOMParser();
|
|
36
39
|
const xmlDoc = parser.parseFromString(annotatedDom, "text/xml");
|
|
37
40
|
let xpathQuery = "";
|
|
@@ -4,7 +4,7 @@ exports.findElementUsingFF = void 0;
|
|
|
4
4
|
const appendScriptData_js_1 = require("../../fireflinkData/fireflinkScript/appendScriptData.js");
|
|
5
5
|
const switchToIframeByMeta_js_1 = require("./switchToIframeByMeta.js");
|
|
6
6
|
const findElementUsingFF = async (args) => {
|
|
7
|
-
await args.driver.
|
|
7
|
+
await args.driver.switchFrame(null);
|
|
8
8
|
const usedElementNames = [];
|
|
9
9
|
for (const frameMeta of args.frames) {
|
|
10
10
|
const xpathUsed = await (0, switchToIframeByMeta_js_1.switchToIframeByMeta)(args.driver, frameMeta);
|
|
@@ -27,7 +27,6 @@ const findElementUsingFF = async (args) => {
|
|
|
27
27
|
stepInputs: [],
|
|
28
28
|
pageDOM: args.pageDOM,
|
|
29
29
|
elementGetter: args.elementGetter,
|
|
30
|
-
ffNumber: args.fireflinkIndex,
|
|
31
30
|
elementName: finalElementName,
|
|
32
31
|
elementType: args.elementType,
|
|
33
32
|
selector: xpathUsed,
|
|
@@ -15,7 +15,9 @@ port.on("message", (data) => {
|
|
|
15
15
|
(0, logData_js_1.initLogger)(sessionPath);
|
|
16
16
|
loggerInitialized = true;
|
|
17
17
|
}
|
|
18
|
-
const formattedAttribute = attribute.
|
|
18
|
+
const formattedAttribute = attribute.startsWith("[")
|
|
19
|
+
? attribute.replace("[", "//*[@")
|
|
20
|
+
: attribute;
|
|
19
21
|
const result = (0, getElementsFromHTML_js_1.getAiElementsFromHTML)({
|
|
20
22
|
locators: [
|
|
21
23
|
{
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|