ff-automationv2 2.2.14 → 2.2.15

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 (89) hide show
  1. package/dist/ai/llmprompts/systemPrompts/combinedActionExtractorPromptMob.js +4 -3
  2. package/dist/ai/llmprompts/systemPrompts/errorDescriptionPrompt.js +9 -11
  3. package/dist/ai/llmprompts/systemPrompts/fireflinkElementIndexExtactors.js +7 -7
  4. package/dist/ai/llmprompts/systemPrompts/fireflinkElementIndexExtractor_Mob.js +39 -0
  5. package/dist/ai/llmprompts/systemPrompts/mobileKeywordExtractor.js +2 -1
  6. package/dist/ai/llmprompts/systemPrompts/verifyActionExtractorPromptMob.js +2 -1
  7. package/dist/ai/llmprompts/systemPrompts/visionPrompt.js +3 -2
  8. package/dist/ai/llmprompts/systemPrompts/waitActionExtractorPrompt.js +1 -0
  9. package/dist/ai/llmprompts/systemPrompts/waitActionExtractorPromptMob.js +1 -0
  10. package/dist/automation/actions/executor.d.ts +19 -1
  11. package/dist/automation/actions/executor.js +303 -1
  12. package/dist/automation/actions/interaction/click/MOB_DoubleTapAtSpecifiedLocation.d.ts +2 -0
  13. package/dist/automation/actions/interaction/click/MOB_DoubleTapAtSpecifiedLocation.js +26 -0
  14. package/dist/automation/actions/interaction/elementLessAction/MobCheckIfAppIsClosed.d.ts +2 -0
  15. package/dist/automation/actions/interaction/elementLessAction/MobCheckIfAppIsClosed.js +20 -0
  16. package/dist/automation/actions/interaction/elementLessAction/MobRunAppInBackgroundInterface.d.ts +2 -0
  17. package/dist/automation/actions/interaction/elementLessAction/MobRunAppInBackgroundInterface.js +18 -0
  18. package/dist/automation/actions/interaction/enterActions/EnterInputIntoElementFromClipBoardInterface_mob.d.ts +2 -0
  19. package/dist/automation/actions/interaction/enterActions/EnterInputIntoElementFromClipBoardInterface_mob.js +26 -0
  20. package/dist/automation/actions/interaction/enterActions/enterInput.js +2 -2
  21. package/dist/automation/actions/interaction/enterActions/enterInputAndPress.js +1 -1
  22. package/dist/automation/actions/interaction/enterActions/enterusingJs.js +1 -1
  23. package/dist/automation/actions/interaction/enterActions/waitAndEnter.js +3 -3
  24. package/dist/automation/actions/interaction/find/MOB_FindElement.d.ts +2 -0
  25. package/dist/automation/actions/interaction/find/MOB_FindElement.js +34 -0
  26. package/dist/automation/actions/interaction/find/findElements.js +16 -2
  27. package/dist/automation/actions/interaction/get/getScreenshot.js +14 -16
  28. package/dist/automation/actions/interaction/get/getScreenshotAs.js +26 -16
  29. package/dist/automation/actions/interaction/pinch/PinchInByPercentMob.d.ts +2 -0
  30. package/dist/automation/actions/interaction/pinch/PinchInByPercentMob.js +27 -0
  31. package/dist/automation/actions/interaction/pinch/PinchOutByPercentMob.d.ts +2 -0
  32. package/dist/automation/actions/interaction/pinch/PinchOutByPercentMob.js +27 -0
  33. package/dist/automation/actions/interaction/press/mobPressBackSpaceKey.d.ts +2 -0
  34. package/dist/automation/actions/interaction/press/mobPressBackSpaceKey.js +16 -0
  35. package/dist/automation/actions/interaction/press/mobPressSpaceKey.d.ts +2 -0
  36. package/dist/automation/actions/interaction/press/mobPressSpaceKey.js +16 -0
  37. package/dist/automation/actions/interaction/swipe/swipeDirectionNTimes.d.ts +2 -0
  38. package/dist/automation/actions/interaction/swipe/swipeDirectionNTimes.js +27 -0
  39. package/dist/automation/actions/interaction/swipe/swipeDownToElement.d.ts +2 -0
  40. package/dist/automation/actions/interaction/swipe/swipeDownToElement.js +46 -0
  41. package/dist/automation/actions/interaction/swipe/swipeLeftToElement.d.ts +2 -0
  42. package/dist/automation/actions/interaction/swipe/swipeLeftToElement.js +46 -0
  43. package/dist/automation/actions/interaction/swipe/swipeRightToElement.d.ts +2 -0
  44. package/dist/automation/actions/interaction/swipe/swipeRightToElement.js +46 -0
  45. package/dist/automation/actions/interaction/swipe/swipeUpToElement.d.ts +2 -0
  46. package/dist/automation/actions/interaction/swipe/swipeUpToElement.js +49 -0
  47. package/dist/automation/actions/interaction/swipe/swipeUpToElementForMWeb.d.ts +2 -0
  48. package/dist/automation/actions/interaction/swipe/swipeUpToElementForMWeb.js +48 -0
  49. package/dist/automation/actions/interaction/swipe/swipeUsingReferenceElement.d.ts +2 -0
  50. package/dist/automation/actions/interaction/swipe/swipeUsingReferenceElement.js +140 -0
  51. package/dist/automation/actions/interaction/verify/VerifyElementNotContainsText.js +2 -2
  52. package/dist/automation/actions/interaction/wait/waitTillElementIsClickable.js +5 -1
  53. package/dist/automation/actions/interaction/wait/waitTillPresenceOfElement.js +1 -1
  54. package/dist/automation/actions/interface/clickActionInterface.d.ts +8 -0
  55. package/dist/automation/actions/interface/elelementLessActionInterface.d.ts +12 -0
  56. package/dist/automation/actions/interface/findActionInterface.d.ts +10 -2
  57. package/dist/automation/actions/interface/interactionActionInterface.d.ts +8 -0
  58. package/dist/automation/actions/interface/pinchActionInterface.d.ts +19 -0
  59. package/dist/automation/actions/interface/pressActionInterface.d.ts +10 -0
  60. package/dist/automation/actions/interface/swipeActionInterface.d.ts +89 -0
  61. package/dist/automation/actions/interface/swipeActionInterface.js +1 -0
  62. package/dist/automation/actions/interface/waitActionInterface.d.ts +1 -0
  63. package/dist/core/constants/allAction.js +1 -0
  64. package/dist/core/constants/supportedActions.js +9 -1
  65. package/dist/core/interfaces/actionInterface.d.ts +19 -1
  66. package/dist/core/interfaces/executionDetails.d.ts +1 -4
  67. package/dist/core/interfaces/fireflinkScriptPayloadInterface.d.ts +2 -3
  68. package/dist/core/main/actionHandlerFactory.js +62 -2
  69. package/dist/core/main/runAutomationScript.d.ts +0 -1
  70. package/dist/core/main/runAutomationScript.js +17 -13
  71. package/dist/service/fireflink.service.d.ts +2 -4
  72. package/dist/service/fireflink.service.js +4 -5
  73. package/dist/service/kafka/fireflinkKafka.service.d.ts +2 -2
  74. package/dist/service/kafka/fireflinkKafka.service.js +17 -3
  75. package/dist/utils/logger/logData.d.ts +1 -0
  76. package/dist/utils/logger/logData.js +49 -22
  77. package/dist/utils/swipe/domSearchHelper.d.ts +5 -0
  78. package/dist/utils/swipe/domSearchHelper.js +42 -0
  79. package/dist/utils/swipe/swipeMovement.d.ts +1 -0
  80. package/dist/utils/swipe/swipeMovement.js +81 -0
  81. package/package.json +3 -4
  82. package/dist/tests/Framework.d.ts +0 -0
  83. package/dist/tests/Framework.js +0 -62
  84. package/dist/tests/test1.d.ts +0 -7
  85. package/dist/tests/test1.js +0 -13
  86. package/dist/tests/test12.js +0 -123
  87. package/dist/tests/test3.js +0 -24
  88. /package/dist/{tests/test12.d.ts → automation/actions/interface/elelementLessActionInterface.js} +0 -0
  89. /package/dist/{tests/test3.d.ts → automation/actions/interface/pinchActionInterface.js} +0 -0
@@ -0,0 +1,49 @@
1
+ import { executeSwipeMovement } from "../../../../utils/swipe/swipeMovement.js";
2
+ import { logger } from "../../../../utils/logger/logData.js";
3
+ import { findElementInDom } from "../../../../utils/swipe/domSearchHelper.js";
4
+ export async function swipeUpToElement(args) {
5
+ try {
6
+ const maxScrolls = Number(args.num_of_scrolls) || 30;
7
+ const direction = "up";
8
+ const searchText = args.value;
9
+ if (!searchText.trim()) {
10
+ throw new Error("SwipeUpToElement requires search text");
11
+ }
12
+ let found = false;
13
+ let discoveredXPath = "";
14
+ let previousDom = "";
15
+ logger.info(`Swipe up to element "${searchText}"`);
16
+ for (let attempt = 1; attempt <= maxScrolls; attempt++) {
17
+ logger.info(`Swipe attempt ${attempt}`);
18
+ await executeSwipeMovement(args.driver, direction);
19
+ const currentDom = await args.driver.getPageSource();
20
+ if (currentDom === previousDom) {
21
+ throw new Error("End of page reached. Stopping swipe.");
22
+ }
23
+ previousDom = currentDom;
24
+ const result = await findElementInDom(args.driver, searchText);
25
+ if (result) {
26
+ discoveredXPath = result.xpath;
27
+ found = true;
28
+ break;
29
+ }
30
+ }
31
+ if (!found) {
32
+ throw new Error(`Element "${searchText}" not found after ${maxScrolls} attempts`);
33
+ }
34
+ args.scriptDataAppender.add(async () => ({
35
+ nlpName: "MOB_SwipeUpToElement",
36
+ stepInputs: [],
37
+ elementsData: [{
38
+ name: args.elementName || searchText,
39
+ type: args.elementType,
40
+ locators: [{ xpath: discoveredXPath }],
41
+ platform: args.platform
42
+ }]
43
+ }));
44
+ }
45
+ catch (error) {
46
+ args.scriptDataAppender.setErrorNLP("MOB_SwipeUpToElement");
47
+ throw new Error("MOB_SwipeUpToElement action failed", { cause: error });
48
+ }
49
+ }
@@ -0,0 +1,2 @@
1
+ import { swipeUpToElementForMWeb } from "../../interface/swipeActionInterface.js";
2
+ export declare function swipeUpToElementForMWeb(args: swipeUpToElementForMWeb): Promise<void>;
@@ -0,0 +1,48 @@
1
+ import { executeSwipeMovement } from "../../../../utils/swipe/swipeMovement.js";
2
+ import { findElementInDom } from "../../../../utils/swipe/domSearchHelper.js";
3
+ export async function swipeUpToElementForMWeb(args) {
4
+ try {
5
+ const maxScrolls = Number(args.num_of_scrolls) || 30;
6
+ const direction = "up";
7
+ const searchText = args.value;
8
+ if (!searchText.trim()) {
9
+ throw new Error("SwipeUpToElement requires search text");
10
+ }
11
+ let found = false;
12
+ let discoveredXPath = "";
13
+ let previousDom = "";
14
+ for (let attempt = 1; attempt <= maxScrolls; attempt++) {
15
+ await executeSwipeMovement(args.driver, direction);
16
+ const currentDom = await args.driver.getPageSource();
17
+ if (currentDom === previousDom) {
18
+ throw new Error("End of page reached. Stopping swipe.");
19
+ }
20
+ previousDom = currentDom;
21
+ const result = await findElementInDom(args.driver, searchText);
22
+ if (result) {
23
+ discoveredXPath = result.xpath;
24
+ found = true;
25
+ break;
26
+ }
27
+ }
28
+ if (!found) {
29
+ throw new Error(`Element "${searchText}" not found after ${maxScrolls} attempts`);
30
+ }
31
+ args.scriptDataAppender.add(async () => {
32
+ return {
33
+ nlpName: 'MOB_SwipeUpToElementForMWeb',
34
+ stepInputs: [],
35
+ elementsData: [{
36
+ name: args.elementName,
37
+ type: args.elementType,
38
+ locators: [{ "xpath": discoveredXPath }],
39
+ platform: args.platform
40
+ }]
41
+ };
42
+ });
43
+ }
44
+ catch (error) {
45
+ args.scriptDataAppender.setErrorNLP("MOB_SwipeUpToElementForMWeb");
46
+ throw new Error("MOB_SwipeUpToElementForMWeb action failed", { cause: error });
47
+ }
48
+ }
@@ -0,0 +1,2 @@
1
+ import type { swipeUsingReferenceElement } from "../../interface/swipeActionInterface.js";
2
+ export declare function swipeUsingReferenceElement(args: swipeUsingReferenceElement): Promise<void>;
@@ -0,0 +1,140 @@
1
+ import { executeSwipeMovement } from "../../../../utils/swipe/swipeMovement.js";
2
+ import { logger } from "../../../../utils/logger/logData.js";
3
+ import { findElementInDom } from "../../../../utils/swipe/domSearchHelper.js";
4
+ export async function swipeUsingReferenceElement(args) {
5
+ try {
6
+ const parts = args.value.split("->");
7
+ if (parts.length < 2) {
8
+ throw new Error("Input must be in 'Reference -> Target' format");
9
+ }
10
+ const referenceText = parts[0].trim();
11
+ const targetText = parts[1].trim();
12
+ const direction = args.direction && args.direction !== "none"
13
+ ? args.direction
14
+ : "left";
15
+ const maxScrolls = Number(args.num_of_scrolls) || 30;
16
+ let referenceSeen = false;
17
+ let discoveredXPath = "";
18
+ let previousDom = "";
19
+ let found = false;
20
+ logger.info(`SwipeUsingReference: reference="${referenceText}" target="${targetText}"`);
21
+ const windowSize = await args.driver.getWindowSize();
22
+ const screenWidth = windowSize.width;
23
+ const screenHeight = windowSize.height;
24
+ for (let attempt = 1; attempt <= maxScrolls; attempt++) {
25
+ logger.info(`Swipe attempt ${attempt}`);
26
+ const currentDom = await args.driver.getPageSource();
27
+ if (currentDom === previousDom) {
28
+ throw new Error("End of page reached. Stopping swipe.");
29
+ }
30
+ previousDom = currentDom;
31
+ if (!referenceSeen) {
32
+ const refResult = await findElementInDom(args.driver, referenceText);
33
+ if (refResult) {
34
+ referenceSeen = true;
35
+ logger.info(`Reference "${referenceText}" found`);
36
+ }
37
+ else {
38
+ logger.info(`Reference not visible yet. Swiping to find it.`);
39
+ await executeSwipeMovement(args.driver, direction);
40
+ continue;
41
+ }
42
+ }
43
+ const refResult = await findElementInDom(args.driver, referenceText);
44
+ if (!refResult) {
45
+ logger.info("Reference lost from screen, searching again.");
46
+ referenceSeen = false;
47
+ await executeSwipeMovement(args.driver, direction);
48
+ continue;
49
+ }
50
+ const refElement = await args.driver.$(refResult.xpath);
51
+ let rect;
52
+ if (refElement && typeof refElement.getRect === "function") {
53
+ rect = await refElement.getRect();
54
+ }
55
+ else {
56
+ const location = await refElement.getLocation();
57
+ const size = await refElement.getSize();
58
+ rect = {
59
+ x: location.x,
60
+ y: location.y,
61
+ width: size.width,
62
+ height: size.height
63
+ };
64
+ }
65
+ let startX;
66
+ let startY;
67
+ let endX;
68
+ let endY;
69
+ if (direction === "left" || direction === "right") {
70
+ const y = rect.y + rect.height / 2;
71
+ if (direction === "left") {
72
+ startX = screenWidth * 0.7;
73
+ endX = screenWidth * 0.2;
74
+ }
75
+ else {
76
+ startX = screenWidth * 0.2;
77
+ endX = screenWidth * 0.7;
78
+ }
79
+ startY = y;
80
+ endY = y;
81
+ }
82
+ else {
83
+ const x = rect.x + rect.width / 2;
84
+ if (direction === "up") {
85
+ startY = screenHeight * 0.7;
86
+ endY = screenHeight * 0.2;
87
+ }
88
+ else {
89
+ startY = screenHeight * 0.2;
90
+ endY = screenHeight * 0.7;
91
+ }
92
+ startX = x;
93
+ endX = x;
94
+ }
95
+ // W3C swipe gesture (modern replacement for touchPerform)
96
+ await args.driver.performActions([
97
+ {
98
+ type: "pointer",
99
+ id: "finger1",
100
+ parameters: { pointerType: "touch" },
101
+ actions: [
102
+ { type: "pointerMove", duration: 0, x: Math.floor(startX), y: Math.floor(startY) },
103
+ { type: "pointerDown", button: 0 },
104
+ { type: "pointerMove", duration: 800, x: Math.floor(endX), y: Math.floor(endY) },
105
+ { type: "pointerUp", button: 0 }
106
+ ]
107
+ }
108
+ ]);
109
+ await args.driver.pause(800);
110
+ logger.info(`Swiped anchored to reference element`);
111
+ // STEP 3: check for target
112
+ const targetResult = await findElementInDom(args.driver, targetText);
113
+ if (targetResult) {
114
+ discoveredXPath = targetResult.xpath;
115
+ logger.info(`Target "${targetText}" found`);
116
+ found = true;
117
+ break;
118
+ }
119
+ }
120
+ if (!found) {
121
+ throw new Error(`Target "${targetText}" not found after ${maxScrolls} swipes`);
122
+ }
123
+ args.scriptDataAppender.add(async () => ({
124
+ nlpName: "MOB_SwipeUsingReferenceElement",
125
+ stepInputs: [],
126
+ elementsData: [
127
+ {
128
+ name: targetText,
129
+ type: args.elementType,
130
+ locators: [{ xpath: discoveredXPath }],
131
+ platform: args.platform
132
+ }
133
+ ]
134
+ }));
135
+ }
136
+ catch (error) {
137
+ args.scriptDataAppender.setErrorNLP("MOB_SwipeUsingReferenceElement");
138
+ throw new Error("MOB_SwipeUsingReferenceElement action failed", { cause: error });
139
+ }
140
+ }
@@ -5,8 +5,8 @@ export async function verifyElementNotContainsText(args) {
5
5
  const element = await args.driver.$(args.selector);
6
6
  const expected = await element.getAttribute("text");
7
7
  const caseSensitive = false;
8
- if (expected !== args.value) {
9
- throw new Error(`Element does not contain the text. Expected: not containing "${args.value}", Actual: contains "${expected}"`);
8
+ if (expected == args.value) {
9
+ throw new Error(`Element do contain the text. Expected: not containing "${args.value}", Actual: contains "${expected}"`);
10
10
  }
11
11
  args.scriptDataAppender.add(async () => {
12
12
  return {
@@ -3,7 +3,11 @@ export async function waitTillElementIsClickable(args) {
3
3
  case "android":
4
4
  try {
5
5
  const element = await args.driver.$(args.selector);
6
- await element.waitForClickable({
6
+ await element.waitForExist({ timeout: 10000 });
7
+ await element.waitForDisplayed({ timeout: 10000 });
8
+ await args.driver.waitUntil(async () => {
9
+ return await element.isEnabled();
10
+ }, {
7
11
  timeout: 10000,
8
12
  timeoutMsg: `Element ${args.elementName} did not become clickable`
9
13
  });
@@ -11,7 +11,7 @@ export async function waitTillPresenceOfElement(args) {
11
11
  elementsData: [{
12
12
  name: args.elementName,
13
13
  type: args.elementType,
14
- locators: [{ xpath: args.selector }],
14
+ locators: [{ xpath: args.value }],
15
15
  platform: args.platform
16
16
  }]
17
17
  };
@@ -79,6 +79,14 @@ export interface MOB_TapInterface {
79
79
  elementType: any;
80
80
  platform: string;
81
81
  }
82
+ export interface MOB_DoubleTapAtSpecifiedLocation {
83
+ driver: WebdriverIO.Browser;
84
+ value: string;
85
+ scriptDataAppender: ScriptDataAppender;
86
+ elementName: string;
87
+ elementType: any;
88
+ platform: string;
89
+ }
82
90
  export interface MOB_TapOnSpecifiedLocationInterface {
83
91
  driver: WebdriverIO.Browser;
84
92
  value: string;
@@ -0,0 +1,12 @@
1
+ import { ScriptDataAppender } from "../../../fireflinkData/fireflinkScript/scriptGenrationData.js";
2
+ export interface MOB_RunAppInBackgroundInterface {
3
+ driver: WebdriverIO.Browser;
4
+ value: string;
5
+ scriptDataAppender: ScriptDataAppender;
6
+ platform: string;
7
+ }
8
+ export interface MOB_CheckIfAppIsClosedInterface {
9
+ driver: WebdriverIO.Browser;
10
+ scriptDataAppender: ScriptDataAppender;
11
+ platform: string;
12
+ }
@@ -1,5 +1,5 @@
1
- import { ElementGetter } from "../../../fireflinkData/fireflinkLocators/getListOfLocators";
2
- import { ScriptDataAppender } from "../../../fireflinkData/fireflinkScript/scriptGenrationData";
1
+ import { ElementGetter } from "../../../fireflinkData/fireflinkLocators/getListOfLocators.js";
2
+ import { ScriptDataAppender } from "../../../fireflinkData/fireflinkScript/scriptGenrationData.js";
3
3
  export interface FindElementsInterface {
4
4
  driver: WebdriverIO.Browser;
5
5
  selector: string;
@@ -12,3 +12,11 @@ export interface FindElementsInterface {
12
12
  platform: string;
13
13
  value: string;
14
14
  }
15
+ export interface MOB_FindElementInterface {
16
+ driver: WebdriverIO.Browser;
17
+ selector: string;
18
+ elementName: string;
19
+ elementType: string;
20
+ scriptDataAppender: ScriptDataAppender;
21
+ platform: string;
22
+ }
@@ -60,6 +60,14 @@ export interface MOB_EnterInterface {
60
60
  elementType: any;
61
61
  platform: string;
62
62
  }
63
+ export interface MOB_EnterInputIntoElementFromClipBoardInterface {
64
+ driver: WebdriverIO.Browser;
65
+ selector: string;
66
+ scriptDataAppender: ScriptDataAppender;
67
+ elementName: string;
68
+ elementType: any;
69
+ platform: string;
70
+ }
63
71
  export interface EnterUrlInterface {
64
72
  driver: WebdriverIO.Browser;
65
73
  value: string;
@@ -0,0 +1,19 @@
1
+ import { ScriptDataAppender } from "../../../fireflinkData/fireflinkScript/scriptGenrationData.js";
2
+ export interface MOB_PinchInByPercent {
3
+ driver: WebdriverIO.Browser;
4
+ selector: string;
5
+ value: string;
6
+ scriptDataAppender: ScriptDataAppender;
7
+ platform: string;
8
+ elementName: string;
9
+ elementType: any;
10
+ }
11
+ export interface MOB_PinchOutByPercent {
12
+ driver: WebdriverIO.Browser;
13
+ selector: string;
14
+ value: string;
15
+ scriptDataAppender: ScriptDataAppender;
16
+ platform: string;
17
+ elementName: string;
18
+ elementType: any;
19
+ }
@@ -35,3 +35,13 @@ export interface MOB_LongPressInterface {
35
35
  elementName: string;
36
36
  elementType: any;
37
37
  }
38
+ export interface PressBackSpaceKeyInterface {
39
+ driver: WebdriverIO.Browser;
40
+ scriptDataAppender: ScriptDataAppender;
41
+ platform: string;
42
+ }
43
+ export interface PressSpaceKeyInterface {
44
+ driver: WebdriverIO.Browser;
45
+ scriptDataAppender: ScriptDataAppender;
46
+ platform: string;
47
+ }
@@ -0,0 +1,89 @@
1
+ import { ScriptDataAppender } from "../../../fireflinkData/fireflinkScript/scriptGenrationData.js";
2
+ export interface swipeToElement {
3
+ driver: WebdriverIO.Browser;
4
+ pageDOM: string;
5
+ value: string;
6
+ elementName: string;
7
+ elementType: string;
8
+ scriptDataAppender: ScriptDataAppender;
9
+ num_of_scrolls?: number;
10
+ platform: string;
11
+ }
12
+ export interface swipeUpToElement {
13
+ driver: WebdriverIO.Browser;
14
+ value: string;
15
+ elementName: string;
16
+ elementType: string;
17
+ scriptDataAppender: ScriptDataAppender;
18
+ num_of_scrolls?: number;
19
+ platform: string;
20
+ }
21
+ export interface swipeDownToElement {
22
+ driver: WebdriverIO.Browser;
23
+ value: string;
24
+ elementName: string;
25
+ elementType: string;
26
+ scriptDataAppender: ScriptDataAppender;
27
+ num_of_scrolls?: number;
28
+ platform: string;
29
+ }
30
+ export interface swipeLeftToElement {
31
+ driver: WebdriverIO.Browser;
32
+ value: string;
33
+ elementName: string;
34
+ elementType: string;
35
+ scriptDataAppender: ScriptDataAppender;
36
+ num_of_scrolls?: number;
37
+ platform: string;
38
+ }
39
+ export interface swipeRightToElement {
40
+ driver: WebdriverIO.Browser;
41
+ value: string;
42
+ elementName: string;
43
+ elementType: string;
44
+ scriptDataAppender: ScriptDataAppender;
45
+ num_of_scrolls?: number;
46
+ platform: string;
47
+ }
48
+ export interface swipeNTimes {
49
+ driver: WebdriverIO.Browser;
50
+ num_of_scrolls: string;
51
+ scriptDataAppender: ScriptDataAppender;
52
+ direction?: string;
53
+ platform: string;
54
+ }
55
+ export interface swipeDirectionNTimes {
56
+ driver: WebdriverIO.Browser;
57
+ num_of_scrolls: string;
58
+ scriptDataAppender: ScriptDataAppender;
59
+ direction: string;
60
+ platform: string;
61
+ }
62
+ export interface swipeToElementForMWeb {
63
+ driver: WebdriverIO.Browser;
64
+ selector: string;
65
+ elementName: string;
66
+ elementType: string;
67
+ scriptDataAppender: ScriptDataAppender;
68
+ num_of_scrolls?: number;
69
+ platform: string;
70
+ }
71
+ export interface swipeUpToElementForMWeb {
72
+ driver: WebdriverIO.Browser;
73
+ value: string;
74
+ elementName: string;
75
+ elementType: string;
76
+ scriptDataAppender: ScriptDataAppender;
77
+ num_of_scrolls?: number;
78
+ platform: string;
79
+ }
80
+ export interface swipeUsingReferenceElement {
81
+ driver: WebdriverIO.Browser;
82
+ value: string;
83
+ elementName: string;
84
+ elementType: string;
85
+ scriptDataAppender: ScriptDataAppender;
86
+ num_of_scrolls: string;
87
+ direction: string;
88
+ platform: string;
89
+ }
@@ -63,6 +63,7 @@ export interface MOB_WaitTillAttributeOfElementContainsStringInterface {
63
63
  export interface waitTillPresenceOfElementInterface {
64
64
  driver: WebdriverIO.Browser;
65
65
  selector: string;
66
+ value: string;
66
67
  elementName: string;
67
68
  elementType: string;
68
69
  platform: string;
@@ -15,6 +15,7 @@ export const allKeywordAction = [
15
15
  "drag_and_drop",
16
16
  "closeApp",
17
17
  "switch",
18
+ "swipe",
18
19
  "cleartext",
19
20
  "tap",
20
21
  "combined"
@@ -7,7 +7,8 @@ export const INPUTLESS_ACTIONS = [
7
7
  "maximize",
8
8
  "minimize",
9
9
  "close",
10
- "closeApp"
10
+ "closeApp",
11
+ "MOB_VerifyIfAppIsClosed"
11
12
  ];
12
13
  export const ELEMENTLESS_ACTION = [
13
14
  "Sleep",
@@ -114,6 +115,13 @@ export const ELEMENTLESS_ACTION = [
114
115
  "SetClipBoardText",
115
116
  "PressAnyKey",
116
117
  "PressEnterKey",
118
+ "MOB_RunAppInBackground",
119
+ "MOB_PressBackSpaceKey",
120
+ "MOB_PressSpaceKey",
121
+ "MOB_RunAppInBackground",
122
+ "MOB_DoubleTapAtSpecifiedLocation",
123
+ "MOB_WaitTillPresenceOfElement",
124
+ "MOB_WaitTillPresenceOfAllElements",
117
125
  "MOB_OpenNotification",
118
126
  "MOB_ResetApp",
119
127
  "MOB_HideKeyboard",
@@ -228,6 +228,21 @@ export interface IActionExecutor {
228
228
  getAudioHeight(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
229
229
  getAudioDimension(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
230
230
  getAudioDecodedByte(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
231
+ swipeToElement(value: string, elementName: string, elementType: string, num_of_scrolls?: number): Promise<void>;
232
+ swipeUpToElement(value: string, elementName: string, elementType: string, num_of_scrolls?: number): Promise<void>;
233
+ swipeDownToElement(value: string, elementName: string, elementType: string, num_of_scrolls?: number): Promise<void>;
234
+ swipeLeftToElement(value: string, elementName: string, elementType: string, num_of_scrolls?: number): Promise<void>;
235
+ swipeRightToElement(value: string, elementName: string, elementType: string, num_of_scrolls?: number): Promise<void>;
236
+ swipeNTimes(num_of_scrolls: string, direction: string): Promise<void>;
237
+ swipeDirectionNTimes(num_of_scrolls: string, direction: string): Promise<void>;
238
+ swipeToElementForMWeb(value: string, elementName: string, elementType: string, num_of_scrolls?: number): Promise<void>;
239
+ swipeUsingReferenceElement(value: string, elementName: string, elementType: string, num_of_scrolls: string, direction: string): Promise<void>;
240
+ MOB_EnterInputIntoElementFromClipBoard(selector: string, elementName: string, elementType: string): Promise<void>;
241
+ MOB_PinchInByPercent(selector: string, value: string, elementName: string, elementType: string): Promise<void>;
242
+ MOB_PinchOutByPercent(selector: string, value: string, elementName: string, elementType: string): Promise<void>;
243
+ MOB_DoubleTapAtSpecifiedLocation(value: string, elementName: string, elementType: string): Promise<void>;
244
+ MOB_CheckIfAppIsClosed(): Promise<void>;
245
+ MOB_RunAppInBackground(value: string): Promise<void>;
231
246
  OpenNotification(): Promise<void>;
232
247
  ResetApp(): Promise<void>;
233
248
  HideKeyboard(): Promise<void>;
@@ -258,13 +273,16 @@ export interface IActionExecutor {
258
273
  ActivateAppUsingAppPackage(value: string): Promise<void>;
259
274
  LongPress(selector: string, value: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
260
275
  MOB_PressBackKey(): Promise<void>;
261
- WaitTillPresenceOfElement(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
276
+ MOB_PressBackSpaceKey(): Promise<void>;
277
+ MOB_PressSpaceKey(): Promise<void>;
278
+ WaitTillPresenceOfElement(pageDOM: string, selector: string, value: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
262
279
  WaitTillPresenceOfAllElements(pageDOM: string, selector: string, value: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
263
280
  WaitTillAttributeOfElementIsString(pageDOM: string, selector: string, value: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
264
281
  EnterUrl(value: string): Promise<void>;
265
282
  SetClipBoardText(value: string): Promise<void>;
266
283
  PressAnyKeyNTimes(value: string): Promise<void>;
267
284
  FindElements(pageDOM: string, selector: string, value: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
285
+ MOB_FindElement(selector: string, elementName: string, elementType: string): Promise<void>;
268
286
  WaitTillElementIsClickable(pageDOM: string, selector: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
269
287
  CheckIfElementIsDisplayed(pageDOM: string, selector: string, value: string, fireflinkIndex: string, elementName: string, elementType: string): Promise<void>;
270
288
  PressAnyKey(value: string): Promise<void>;
@@ -1,8 +1,8 @@
1
1
  import { BrowserConfig } from "./browserConfigurationInterface.js";
2
2
  import { CloudConfig } from "./cloudConfigInterface.js";
3
3
  import { platform } from "../types/scriptTypesType.js";
4
- import { Producer } from "kafkajs";
5
4
  export interface AutomationRequest {
5
+ sessionPath: string;
6
6
  userStory: string[][];
7
7
  scriptName: string;
8
8
  version: string;
@@ -17,11 +17,9 @@ export interface AutomationRequest {
17
17
  licenseType: string;
18
18
  licenseId: string;
19
19
  userId: string;
20
- topic: string;
21
20
  projectType: string;
22
21
  serverData: any;
23
22
  userName: string;
24
- service_accounts: any;
25
23
  serverHost: string;
26
24
  browser: BrowserConfig;
27
25
  platform: platform;
@@ -29,7 +27,6 @@ export interface AutomationRequest {
29
27
  appiumPort: number;
30
28
  realDeviceId: string;
31
29
  platformVersion: string;
32
- kafkaProducerInstance: Producer | any;
33
30
  isCloud?: boolean;
34
31
  capabilities?: Record<string, any>;
35
32
  cloudConfig?: CloudConfig;
@@ -19,16 +19,15 @@ export interface IPayload {
19
19
  licenseType: string;
20
20
  licenseId: string;
21
21
  userId: string;
22
- topic: string;
23
22
  projectType: string;
24
23
  tokensConsumed: number;
25
- errorInfo: IErrorInfo;
24
+ errorInfo?: IErrorInfo;
26
25
  }
27
26
  export interface IFireFlinkApiService {
28
27
  getInstancesDetailsApi(headers: Record<string, string>, url: string): Promise<any>;
29
28
  }
30
29
  export interface IFireflinkService {
31
- runGetInstancesDetails(projectId: string, token: string, serverHost: string): Promise<any>;
30
+ runGetInstancesDetails(projectId: string, token: string, serverData: string): Promise<any>;
32
31
  }
33
32
  export interface IKafkaPayload {
34
33
  message: IPayload & {