ff-automationv2 2.2.24 → 2.2.25

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 (98) hide show
  1. package/dist/ai/llmprompts/systemPrompts/actionExtractorPrompt.js +2 -2
  2. package/dist/ai/llmprompts/systemPrompts/errorDescriptionPrompt.js +1 -1
  3. package/dist/ai/llmprompts/systemPrompts/fireflinkElementIndexExtactors.js +1 -1
  4. package/dist/ai/llmprompts/systemPrompts/fireflinkElementIndexExtractor_Mob.js +1 -1
  5. package/dist/ai/llmprompts/systemPrompts/getActionExtractorPrompt.js +3 -3
  6. package/dist/ai/llmprompts/systemPrompts/verifyActionExtractorPrompt.js +4 -2
  7. package/dist/ai/llmprompts/systemPrompts/visionPrompt.js +1 -0
  8. package/dist/automation/actions/executor.d.ts +1 -1
  9. package/dist/automation/actions/executor.js +2 -1
  10. package/dist/automation/actions/interaction/clear/clear.js +1 -1
  11. package/dist/automation/actions/interaction/clear/clearAndEnter.js +1 -1
  12. package/dist/automation/actions/interaction/click/click.js +1 -1
  13. package/dist/automation/actions/interaction/click/clickNtimes.js +1 -1
  14. package/dist/automation/actions/interaction/click/doubleClick.js +1 -1
  15. package/dist/automation/actions/interaction/click/waitAndClick.js +1 -1
  16. package/dist/automation/actions/interaction/dragAndDrop/dragAndDrop.js +1 -1
  17. package/dist/automation/actions/interaction/enterActions/EnterInputIntoElementFromClipBoardInterface_mob.js +1 -1
  18. package/dist/automation/actions/interaction/enterActions/enterInput.js +1 -1
  19. package/dist/automation/actions/interaction/enterActions/enterInputAndPress.js +1 -1
  20. package/dist/automation/actions/interaction/find/MOB_FindElement.js +2 -2
  21. package/dist/automation/actions/interaction/find/findElements.js +3 -4
  22. package/dist/automation/actions/interaction/get/MOB_GetHeightOfElement.js +1 -1
  23. package/dist/automation/actions/interaction/get/MOB_GetTextFromElementAndSetToClipBoard.js +1 -1
  24. package/dist/automation/actions/interaction/get/MOB_GetWidthOfElement.js +1 -1
  25. package/dist/automation/actions/interaction/get/getAttribute.js +1 -1
  26. package/dist/automation/actions/interaction/get/getListOfElementsFromLocatorTypeLocatorValue.js +1 -1
  27. package/dist/automation/actions/interaction/get/getLocation.js +1 -1
  28. package/dist/automation/actions/interaction/get/getRect.js +2 -2
  29. package/dist/automation/actions/interaction/get/getSize.js +1 -1
  30. package/dist/automation/actions/interaction/get/getSizeOfBrowserWindow.js +3 -0
  31. package/dist/automation/actions/interaction/get/getTagName.js +1 -1
  32. package/dist/automation/actions/interaction/get/getText.js +1 -1
  33. package/dist/automation/actions/interaction/get/getWidthOfWebElement.js +2 -0
  34. package/dist/automation/actions/interaction/get/getXLocationOfBrowserWindow.js +2 -0
  35. package/dist/automation/actions/interaction/get/getXLocationOfWebElement.js +1 -1
  36. package/dist/automation/actions/interaction/get/getYLocationOfWebElement.js +1 -1
  37. package/dist/automation/actions/interaction/maximize/maximize.js +2 -2
  38. package/dist/automation/actions/interaction/pinch/PinchInByPercentMob.js +3 -3
  39. package/dist/automation/actions/interaction/pinch/PinchOutByPercentMob.js +1 -3
  40. package/dist/automation/actions/interaction/press/longPress.js +1 -1
  41. package/dist/automation/actions/interaction/swipe/swipeDownToElement.js +6 -9
  42. package/dist/automation/actions/interaction/swipe/swipeLeftToElement.js +6 -9
  43. package/dist/automation/actions/interaction/swipe/swipeRightToElement.js +6 -9
  44. package/dist/automation/actions/interaction/swipe/swipeUpToElement.js +6 -9
  45. package/dist/automation/actions/interaction/swipe/swipeUpToElementForMWeb.js +5 -5
  46. package/dist/automation/actions/interaction/swipe/swipeUsingReferenceElement.js +71 -76
  47. package/dist/automation/actions/interaction/verify/VerifyAllOptionsAreDeSelected.js +1 -1
  48. package/dist/automation/actions/interaction/verify/VerifyCheckBoxIsNotSelected.js +2 -1
  49. package/dist/automation/actions/interaction/verify/VerifyElementIsClickable.js +1 -1
  50. package/dist/automation/actions/interaction/verify/VerifyElementIsDisabled.js +1 -1
  51. package/dist/automation/actions/interaction/verify/VerifyElementIsDisplayed.js +1 -1
  52. package/dist/automation/actions/interaction/verify/VerifyElementIsEnabled.js +1 -1
  53. package/dist/automation/actions/interaction/verify/VerifyElementIsSelected.js +1 -1
  54. package/dist/automation/actions/interaction/verify/VerifyElementNotContainsText.js +1 -1
  55. package/dist/automation/actions/interaction/verify/VerifyHeightOfWebElement.js +2 -2
  56. package/dist/automation/actions/interaction/verify/VerifyIfXAndYCoordinateOfElement.js +5 -5
  57. package/dist/automation/actions/interaction/verify/VerifyNumberOfElementsByTagName.js +1 -1
  58. package/dist/automation/actions/interaction/verify/VerifyNumberOfElementsByXpath.js +1 -1
  59. package/dist/automation/actions/interaction/verify/VerifyWidthOfElement.js +3 -3
  60. package/dist/automation/actions/interaction/verify/VerifyXLocationOfElement.js +3 -3
  61. package/dist/automation/actions/interaction/verify/VerifyYLocationOfElement.js +3 -3
  62. package/dist/automation/actions/interaction/verify/verifypartialtext.js +1 -1
  63. package/dist/automation/actions/interaction/verify/verifytext.js +1 -1
  64. package/dist/automation/actions/interaction/wait/MOB_WaitTillAttributeOfElementContainsString.js +1 -1
  65. package/dist/automation/actions/interaction/wait/MOB_WaitTillElementIsEnabled.js +1 -1
  66. package/dist/automation/actions/interaction/wait/MOB_WaitTillElementIsInvisible.js +1 -1
  67. package/dist/automation/actions/interaction/wait/MOB_WaitTillElementIsSelected.js +1 -1
  68. package/dist/automation/actions/interaction/wait/MOB_WaitTillElementIsVisible.js +1 -1
  69. package/dist/automation/actions/interaction/wait/MOB_WaitTillStalenessOfElement.js +1 -1
  70. package/dist/automation/actions/interface/verifyActionInterface.d.ts +1 -0
  71. package/dist/automation/mobileSession/initiateMobileSession.d.ts +2 -1
  72. package/dist/automation/mobileSession/initiateMobileSession.js +4 -3
  73. package/dist/core/constants/allAction.js +1 -0
  74. package/dist/core/constants/supportedActions.js +29 -2
  75. package/dist/core/interfaces/actionInterface.d.ts +1 -1
  76. package/dist/core/interfaces/executionDetails.d.ts +1 -0
  77. package/dist/core/interfaces/llmConfigurationInterface.d.ts +1 -1
  78. package/dist/core/main/actionHandlerFactory.js +6 -3
  79. package/dist/core/main/executionContext.js +1 -1
  80. package/dist/core/main/runAutomationScript.js +21 -21
  81. package/dist/imageAnalysisMobile/annotatedScreenshotMobile.js +1 -1
  82. package/dist/imageAnalysisWeb/annotateScreenshot.js +1 -1
  83. package/dist/llmConfig/llmConfiguration.d.ts +1 -2
  84. package/dist/llmConfig/llmConfiguration.js +15 -13
  85. package/dist/tests/test1.d.ts +1 -7
  86. package/dist/tests/test1.js +29 -11
  87. package/dist/tests/test12.d.ts +0 -1
  88. package/dist/tests/test12.js +73 -72
  89. package/dist/tests/testkaf.d.ts +1 -0
  90. package/dist/tests/testkaf.js +56 -0
  91. package/dist/tests/testwe.d.ts +1 -0
  92. package/dist/tests/testwe.js +24 -0
  93. package/dist/utils/DomExtraction/jsForAttributeInjection.d.ts +1 -1
  94. package/dist/utils/DomExtraction/jsForAttributeInjection.js +11 -7
  95. package/dist/utils/InstancesDetails/getInstancesInfo.js +2 -1
  96. package/dist/utils/swipe/domSearchHelper.d.ts +1 -1
  97. package/dist/utils/swipe/domSearchHelper.js +45 -21
  98. package/package.json +5 -4
@@ -16,15 +16,17 @@ async function swipeUpToElement(args) {
16
16
  let discoveredXPath = "";
17
17
  let previousDom = "";
18
18
  logData_js_1.logger.info(`Swipe up to element "${searchText}"`);
19
- for (let attempt = 1; attempt <= maxScrolls; attempt++) {
19
+ let attempt = 1;
20
+ for (attempt; attempt <= maxScrolls; attempt++) {
20
21
  logData_js_1.logger.info(`Swipe attempt ${attempt}`);
21
22
  await (0, swipeMovement_js_1.executeSwipeMovement)(args.driver, direction);
23
+ await args.driver.pause(1000);
22
24
  const currentDom = await args.driver.getPageSource();
23
25
  if (currentDom === previousDom) {
24
26
  throw new Error("End of page reached. Stopping swipe.");
25
27
  }
26
28
  previousDom = currentDom;
27
- const result = await (0, domSearchHelper_js_1.findElementInDom)(args.driver, searchText);
29
+ const result = await (0, domSearchHelper_js_1.findElementInDom)(args.driver, searchText, attempt, currentDom);
28
30
  if (result) {
29
31
  discoveredXPath = result.xpath;
30
32
  found = true;
@@ -36,13 +38,8 @@ async function swipeUpToElement(args) {
36
38
  }
37
39
  args.scriptDataAppender.add(async () => ({
38
40
  nlpName: "MOB_SwipeUpToElement",
39
- stepInputs: [],
40
- elementsData: [{
41
- name: args.elementName || searchText,
42
- type: args.elementType,
43
- locators: [{ xpath: discoveredXPath }],
44
- platform: args.platform
45
- }]
41
+ stepInputs: ["xpath", discoveredXPath, attempt],
42
+ elementsData: []
46
43
  }));
47
44
  }
48
45
  catch (error) {
@@ -21,7 +21,7 @@ async function swipeUpToElementForMWeb(args) {
21
21
  throw new Error("End of page reached. Stopping swipe.");
22
22
  }
23
23
  previousDom = currentDom;
24
- const result = await (0, domSearchHelper_js_1.findElementInDom)(args.driver, searchText);
24
+ const result = await (0, domSearchHelper_js_1.findElementInDom)(args.driver, searchText, attempt, currentDom);
25
25
  if (result) {
26
26
  discoveredXPath = result.xpath;
27
27
  found = true;
@@ -33,19 +33,19 @@ async function swipeUpToElementForMWeb(args) {
33
33
  }
34
34
  args.scriptDataAppender.add(async () => {
35
35
  return {
36
- nlpName: 'MOB_SwipeUpToElementForMWeb',
36
+ nlpName: 'MOB_SwipeToElementForMWeb',
37
37
  stepInputs: [],
38
38
  elementsData: [{
39
39
  name: args.elementName,
40
40
  type: args.elementType,
41
- locators: [{ "xpath": discoveredXPath }],
41
+ locators: [{ "name": "xpath", "value": discoveredXPath }],
42
42
  platform: args.platform
43
43
  }]
44
44
  };
45
45
  });
46
46
  }
47
47
  catch (error) {
48
- args.scriptDataAppender.setErrorNLP("MOB_SwipeUpToElementForMWeb");
49
- throw new Error("MOB_SwipeUpToElementForMWeb action failed", { cause: error });
48
+ args.scriptDataAppender.setErrorNLP("MOB_SwipeToElementForMWeb");
49
+ throw new Error("MOB_SwipeToElementForMWeb action failed", { cause: error });
50
50
  }
51
51
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.swipeUsingReferenceElement = swipeUsingReferenceElement;
4
- const swipeMovement_js_1 = require("../../../../utils/swipe/swipeMovement.js");
5
4
  const logData_js_1 = require("../../../../utils/logger/logData.js");
6
5
  const domSearchHelper_js_1 = require("../../../../utils/swipe/domSearchHelper.js");
7
6
  async function swipeUsingReferenceElement(args) {
@@ -16,103 +15,99 @@ async function swipeUsingReferenceElement(args) {
16
15
  ? args.direction
17
16
  : "left";
18
17
  const maxScrolls = Number(args.num_of_scrolls) || 30;
19
- let referenceSeen = false;
18
+ let refResult = null;
20
19
  let discoveredXPath = "";
21
20
  let previousDom = "";
22
21
  let found = false;
22
+ let swipeCoordinates = null;
23
23
  logData_js_1.logger.info(`SwipeUsingReference: reference="${referenceText}" target="${targetText}"`);
24
24
  const windowSize = await args.driver.getWindowSize();
25
25
  const screenWidth = windowSize.width;
26
26
  const screenHeight = windowSize.height;
27
- for (let attempt = 1; attempt <= maxScrolls; attempt++) {
28
- logData_js_1.logger.info(`Swipe attempt ${attempt}`);
29
- const currentDom = await args.driver.getPageSource();
30
- if (currentDom === previousDom) {
31
- throw new Error("End of page reached. Stopping swipe.");
32
- }
33
- previousDom = currentDom;
34
- if (!referenceSeen) {
35
- const refResult = await (0, domSearchHelper_js_1.findElementInDom)(args.driver, referenceText);
36
- if (refResult) {
37
- referenceSeen = true;
38
- logData_js_1.logger.info(`Reference "${referenceText}" found`);
39
- }
40
- else {
41
- logData_js_1.logger.info(`Reference not visible yet. Swiping to find it.`);
42
- await (0, swipeMovement_js_1.executeSwipeMovement)(args.driver, direction);
43
- continue;
44
- }
45
- }
46
- const refResult = await (0, domSearchHelper_js_1.findElementInDom)(args.driver, referenceText);
47
- if (!refResult) {
48
- logData_js_1.logger.info("Reference lost from screen, searching again.");
49
- referenceSeen = false;
50
- await (0, swipeMovement_js_1.executeSwipeMovement)(args.driver, direction);
51
- continue;
52
- }
53
- const refElement = await args.driver.$(refResult.xpath);
54
- let rect;
55
- if (refElement && typeof refElement.getRect === "function") {
56
- rect = await refElement.getRect();
27
+ const initialDom = await args.driver.getPageSource();
28
+ refResult = await (0, domSearchHelper_js_1.findElementInDom)(args.driver, referenceText, 1, initialDom);
29
+ if (!refResult) {
30
+ throw new Error("Reference element is not visible.");
31
+ }
32
+ logData_js_1.logger.info(`Reference "${referenceText}" found`);
33
+ const refElement = await args.driver.$(refResult.xpath);
34
+ let rect;
35
+ if (refElement && typeof refElement.getRect === "function") {
36
+ rect = await refElement.getRect();
37
+ }
38
+ else {
39
+ const location = await refElement.getLocation();
40
+ const size = await refElement.getSize();
41
+ rect = {
42
+ x: location.x,
43
+ y: location.y,
44
+ width: size.width,
45
+ height: size.height
46
+ };
47
+ }
48
+ let startX;
49
+ let startY;
50
+ let endX;
51
+ let endY;
52
+ if (direction === "left" || direction === "right") {
53
+ const y = rect.y + rect.height / 2;
54
+ if (direction === "left") {
55
+ startX = screenWidth * 0.7;
56
+ endX = screenWidth * 0.2;
57
57
  }
58
58
  else {
59
- const location = await refElement.getLocation();
60
- const size = await refElement.getSize();
61
- rect = {
62
- x: location.x,
63
- y: location.y,
64
- width: size.width,
65
- height: size.height
66
- };
59
+ startX = screenWidth * 0.2;
60
+ endX = screenWidth * 0.7;
67
61
  }
68
- let startX;
69
- let startY;
70
- let endX;
71
- let endY;
72
- if (direction === "left" || direction === "right") {
73
- const y = rect.y + rect.height / 2;
74
- if (direction === "left") {
75
- startX = screenWidth * 0.7;
76
- endX = screenWidth * 0.2;
77
- }
78
- else {
79
- startX = screenWidth * 0.2;
80
- endX = screenWidth * 0.7;
81
- }
82
- startY = y;
83
- endY = y;
62
+ startY = y;
63
+ endY = y;
64
+ }
65
+ else {
66
+ const x = rect.x + rect.width / 2;
67
+ if (direction === "up") {
68
+ startY = screenHeight * 0.7;
69
+ endY = screenHeight * 0.2;
84
70
  }
85
71
  else {
86
- const x = rect.x + rect.width / 2;
87
- if (direction === "up") {
88
- startY = screenHeight * 0.7;
89
- endY = screenHeight * 0.2;
90
- }
91
- else {
92
- startY = screenHeight * 0.2;
93
- endY = screenHeight * 0.7;
94
- }
95
- startX = x;
96
- endX = x;
72
+ startY = screenHeight * 0.2;
73
+ endY = screenHeight * 0.7;
97
74
  }
98
- // W3C swipe gesture (modern replacement for touchPerform)
75
+ startX = x;
76
+ endX = x;
77
+ }
78
+ swipeCoordinates = { startX, startY, endX, endY };
79
+ let attempt = 1;
80
+ for (attempt; attempt <= maxScrolls; attempt++) {
99
81
  await args.driver.performActions([
100
82
  {
101
83
  type: "pointer",
102
84
  id: "finger1",
103
85
  parameters: { pointerType: "touch" },
104
86
  actions: [
105
- { type: "pointerMove", duration: 0, x: Math.floor(startX), y: Math.floor(startY) },
87
+ {
88
+ type: "pointerMove",
89
+ duration: 0,
90
+ x: Math.floor(swipeCoordinates.startX),
91
+ y: Math.floor(swipeCoordinates.startY)
92
+ },
106
93
  { type: "pointerDown", button: 0 },
107
- { type: "pointerMove", duration: 800, x: Math.floor(endX), y: Math.floor(endY) },
94
+ {
95
+ type: "pointerMove",
96
+ duration: 800,
97
+ x: Math.floor(swipeCoordinates.endX),
98
+ y: Math.floor(swipeCoordinates.endY)
99
+ },
108
100
  { type: "pointerUp", button: 0 }
109
101
  ]
110
102
  }
111
103
  ]);
112
104
  await args.driver.pause(800);
113
- logData_js_1.logger.info(`Swiped anchored to reference element`);
114
- // STEP 3: check for target
115
- const targetResult = await (0, domSearchHelper_js_1.findElementInDom)(args.driver, targetText);
105
+ const currentDom = await args.driver.getPageSource();
106
+ if (currentDom === previousDom) {
107
+ throw new Error("End of page reached. Target not found.");
108
+ }
109
+ previousDom = currentDom;
110
+ const targetResult = await (0, domSearchHelper_js_1.findElementInDom)(args.driver, targetText, attempt, currentDom);
116
111
  if (targetResult) {
117
112
  discoveredXPath = targetResult.xpath;
118
113
  logData_js_1.logger.info(`Target "${targetText}" found`);
@@ -121,16 +116,16 @@ async function swipeUsingReferenceElement(args) {
121
116
  }
122
117
  }
123
118
  if (!found) {
124
- throw new Error(`Target "${targetText}" not found after ${maxScrolls} swipes`);
119
+ throw new Error("Target element not found after all swipes.");
125
120
  }
126
121
  args.scriptDataAppender.add(async () => ({
127
122
  nlpName: "MOB_SwipeUsingReferenceElement",
128
- stepInputs: [],
123
+ stepInputs: [args.direction, "xpath", discoveredXPath, attempt],
129
124
  elementsData: [
130
125
  {
131
126
  name: targetText,
132
127
  type: args.elementType,
133
- locators: [{ xpath: discoveredXPath }],
128
+ locators: [{ name: "xpath", value: refResult.xpath }],
134
129
  platform: args.platform
135
130
  }
136
131
  ]
@@ -27,7 +27,7 @@ async function verifyAllOptionsAreDeselected(args) {
27
27
  args.scriptDataAppender.add(async () => {
28
28
  const ffElement = await args.elementGetter.getFireFlinkElement(args.pageDOM, `[ff-inspect="${args.fireflinkIndex}"]`);
29
29
  return {
30
- nlpName: 'VerifyAllOptionsAreDeSelected',
30
+ nlpName: 'VerifyAllOptionsAreDeselected',
31
31
  stepInputs: [],
32
32
  elementsData: [{
33
33
  name: args.elementName,
@@ -5,6 +5,7 @@ const logData_js_1 = require("../../../../utils/logger/logData.js");
5
5
  async function verifyCheckboxIsNotSelected(args) {
6
6
  try {
7
7
  const element = await args.driver.$(args.selector);
8
+ const value = (await args.value) ?? 5;
8
9
  if (!(await element.isExisting())) {
9
10
  // Same logic as Python: if not existing → treat as not selected
10
11
  throw new Error(`Element with selector '${args.selector}' does not exist, treating as not selected.`);
@@ -20,7 +21,7 @@ async function verifyCheckboxIsNotSelected(args) {
20
21
  const ffElement = await args.elementGetter.getFireFlinkElement(args.pageDOM, `[ff-inspect="${args.fireflinkIndex}"]`);
21
22
  return {
22
23
  nlpName: 'VerifyCheckBoxIsNotSelected',
23
- stepInputs: [],
24
+ stepInputs: [value],
24
25
  elementsData: [{
25
26
  name: args.elementName,
26
27
  type: args.elementType,
@@ -22,7 +22,7 @@ async function verifyElementIsClickable(args) {
22
22
  elementsData: [{
23
23
  name: args.elementName,
24
24
  type: args.elementType,
25
- locators: [{ "xpath": args.selector }],
25
+ locators: [{ "name": "xpath", "value": args.selector }],
26
26
  platform: args.platform
27
27
  }]
28
28
  };
@@ -22,7 +22,7 @@ async function verifyElementIsDisabled(args) {
22
22
  elementsData: [{
23
23
  name: args.elementName,
24
24
  type: args.elementType,
25
- locators: [{ "xpath": args.selector }],
25
+ locators: [{ "name": "xpath", "value": args.selector }],
26
26
  platform: args.platform
27
27
  }]
28
28
  };
@@ -22,7 +22,7 @@ async function verifyElementIsDisplayed(args) {
22
22
  elementsData: [{
23
23
  name: args.elementName,
24
24
  type: args.elementType,
25
- locators: [{ "xpath": args.selector }],
25
+ locators: [{ "name": "xpath", "value": args.selector }],
26
26
  platform: args.platform
27
27
  }]
28
28
  };
@@ -22,7 +22,7 @@ async function verifyElementIsEnabled(args) {
22
22
  elementsData: [{
23
23
  name: args.elementName,
24
24
  type: args.elementType,
25
- locators: [{ "xpath": args.selector }],
25
+ locators: [{ "name": "xpath", "value": args.selector }],
26
26
  platform: args.platform
27
27
  }]
28
28
  };
@@ -22,7 +22,7 @@ async function verifyElementIsSelected(args) {
22
22
  elementsData: [{
23
23
  name: args.elementName,
24
24
  type: args.elementType,
25
- locators: [{ "xpath": args.selector }],
25
+ locators: [{ "name": "xpath", "value": args.selector }],
26
26
  platform: args.platform
27
27
  }]
28
28
  };
@@ -18,7 +18,7 @@ async function verifyElementNotContainsText(args) {
18
18
  elementsData: [{
19
19
  name: args.elementName,
20
20
  type: args.elementType,
21
- locators: [{ "xpath": args.selector }],
21
+ locators: [{ "name": "xpath", "value": args.selector }],
22
22
  platform: args.platform
23
23
  }]
24
24
  };
@@ -26,7 +26,7 @@ async function verifyHeightOfWebElement(args) {
26
26
  elementsData: [{
27
27
  name: args.elementName,
28
28
  type: args.elementType,
29
- locators: [{ "xpath": args.selector }],
29
+ locators: [{ "name": "xpath", "value": args.selector }],
30
30
  platform: args.platform
31
31
  }]
32
32
  };
@@ -41,7 +41,7 @@ async function verifyHeightOfWebElement(args) {
41
41
  default:
42
42
  try {
43
43
  const element = await args.driver.$(args.selector);
44
- const expectedHeight = parseInt(args.value, 10);
44
+ const expectedHeight = Number(args.value);
45
45
  const size = await element.getSize();
46
46
  const isMatched = size.height === expectedHeight;
47
47
  logData_js_1.logger.info("Height verification result:", {
@@ -13,8 +13,8 @@ async function verifyIfXAndYCoordinateOfElement(args) {
13
13
  if (parts.length < 2) {
14
14
  throw new Error("Invalid coordinate format. Expected 'x,y'.");
15
15
  }
16
- const expectedX = parseInt(parts[0].trim(), 10);
17
- const expectedY = parseInt(parts[1].trim(), 10);
16
+ const expectedX = Number(parts[0].trim());
17
+ const expectedY = Number(parts[1].trim());
18
18
  const location = await element.getLocation();
19
19
  if (location.x !== expectedX || location.y !== expectedY) {
20
20
  throw new Error("Element coordinates do not match expected values.");
@@ -26,7 +26,7 @@ async function verifyIfXAndYCoordinateOfElement(args) {
26
26
  elementsData: [{
27
27
  name: args.elementName,
28
28
  type: args.elementType,
29
- locators: [{ "xpath": args.selector }],
29
+ locators: [{ "name": "xpath", "value": args.selector }],
30
30
  platform: args.platform
31
31
  }]
32
32
  };
@@ -48,8 +48,8 @@ async function verifyIfXAndYCoordinateOfElement(args) {
48
48
  if (parts.length < 2) {
49
49
  throw new Error("Invalid coordinate format. Expected 'x,y'.");
50
50
  }
51
- const expectedX = parseInt(parts[0].trim(), 10);
52
- const expectedY = parseInt(parts[1].trim(), 10);
51
+ const expectedX = Number(parts[0].trim());
52
+ const expectedY = Number(parts[1].trim());
53
53
  const location = await element.getLocation();
54
54
  if (location.x !== expectedX || location.y !== expectedY) {
55
55
  throw new Error("Element coordinates do not match expected values.");
@@ -12,7 +12,7 @@ async function verifyNumberOfElementsByTagName(args) {
12
12
  logData_js_1.logger.info("Number of elements by tag name verification result:", {
13
13
  ismatched,
14
14
  tagName,
15
- actualCount: length,
15
+ actualCount: elements.length,
16
16
  expectedCount
17
17
  });
18
18
  if (ismatched === false) {
@@ -5,7 +5,7 @@ const logData_js_1 = require("../../../../utils/logger/logData.js");
5
5
  async function verifyNumberOfElementsByXpath(args) {
6
6
  try {
7
7
  const parts = args.value.split(",");
8
- const xpath = parts[0].trim();
8
+ const xpath = parts[0].trim().replace(/^['"]|['"]$/g, "");
9
9
  const expectedCount = parseInt(parts[1], 10);
10
10
  let elements;
11
11
  try {
@@ -7,7 +7,7 @@ async function verifyWidthOfElement(args) {
7
7
  case "android":
8
8
  try {
9
9
  const element = await args.driver.$(args.selector);
10
- const expectedWidth = parseInt(args.value, 10);
10
+ const expectedWidth = Number(args.value);
11
11
  const size = await element.getSize();
12
12
  const isMatched = size.width === expectedWidth;
13
13
  logData_js_1.logger.info("Width verification result:", {
@@ -25,7 +25,7 @@ async function verifyWidthOfElement(args) {
25
25
  elementsData: [{
26
26
  name: args.elementName,
27
27
  type: args.elementType,
28
- locators: [{ "xpath": args.selector }],
28
+ locators: [{ "name": "xpath", "value": args.selector }],
29
29
  platform: args.platform
30
30
  }]
31
31
  };
@@ -40,7 +40,7 @@ async function verifyWidthOfElement(args) {
40
40
  default:
41
41
  try {
42
42
  const element = await args.driver.$(args.selector);
43
- const expectedWidth = parseInt(args.value, 10);
43
+ const expectedWidth = Number(args.value);
44
44
  const size = await element.getSize();
45
45
  const isMatched = size.width === expectedWidth;
46
46
  logData_js_1.logger.info("Width verification result:", {
@@ -7,7 +7,7 @@ async function verifyXLocationOfElement(args) {
7
7
  case "android":
8
8
  try {
9
9
  const element = await args.driver.$(args.selector);
10
- const expectedX = parseInt(args.value, 10);
10
+ const expectedX = Number(args.value);
11
11
  const location = await element.getLocation();
12
12
  const isMatched = location.x === expectedX;
13
13
  logData_js_1.logger.info("X location verification result:", {
@@ -25,7 +25,7 @@ async function verifyXLocationOfElement(args) {
25
25
  elementsData: [{
26
26
  name: args.elementName,
27
27
  type: args.elementType,
28
- locators: [{ "xpath": args.selector }],
28
+ locators: [{ "name": "xpath", "value": args.selector }],
29
29
  platform: args.platform
30
30
  }]
31
31
  };
@@ -40,7 +40,7 @@ async function verifyXLocationOfElement(args) {
40
40
  default:
41
41
  try {
42
42
  const element = await args.driver.$(args.selector);
43
- const expectedX = parseInt(args.value, 10);
43
+ const expectedX = Number(args.value);
44
44
  const location = await element.getLocation();
45
45
  const isMatched = location.x === expectedX;
46
46
  logData_js_1.logger.info("X location verification result:", {
@@ -7,7 +7,7 @@ async function verifyYLocationOfElement(args) {
7
7
  case "android":
8
8
  try {
9
9
  const element = await args.driver.$(args.selector);
10
- const expectedY = parseInt(args.value, 10);
10
+ const expectedY = Number(args.value);
11
11
  const location = await element.getLocation();
12
12
  const isMatched = location.y === expectedY;
13
13
  logData_js_1.logger.info("Y location verification result:", {
@@ -22,7 +22,7 @@ async function verifyYLocationOfElement(args) {
22
22
  elementsData: [{
23
23
  name: args.elementName,
24
24
  type: args.elementType,
25
- locators: [{ "xpath": args.selector }],
25
+ locators: [{ "name": "xpath", "value": args.selector }],
26
26
  platform: args.platform
27
27
  }]
28
28
  };
@@ -37,7 +37,7 @@ async function verifyYLocationOfElement(args) {
37
37
  default:
38
38
  try {
39
39
  const element = await args.driver.$(args.selector);
40
- const expectedY = parseInt(args.value, 10);
40
+ const expectedY = Number(args.value);
41
41
  const location = await element.getLocation();
42
42
  const isMatched = location.y === expectedY;
43
43
  logData_js_1.logger.info("Y location verification result:", {
@@ -20,7 +20,7 @@ async function verifyPartialText(args) {
20
20
  elementsData: [{
21
21
  name: args.elementName,
22
22
  type: args.elementType,
23
- locators: [{ "xpath": args.selector }],
23
+ locators: [{ "name": "xpath", "value": args.selector }],
24
24
  platform: args.platform
25
25
  }]
26
26
  };
@@ -27,7 +27,7 @@ async function verifyText(args) {
27
27
  elementsData: [{
28
28
  name: args.elementName,
29
29
  type: args.elementType,
30
- locators: [{ "xpath": args.selector }],
30
+ locators: [{ "name": "xpath", "value": args.selector }],
31
31
  platform: args.platform
32
32
  }]
33
33
  };
@@ -17,7 +17,7 @@ const MOB_WaitTillAttributeOfElementContainsString = async (args) => {
17
17
  elementsData: [{
18
18
  name: args.elementName,
19
19
  type: args.elementType,
20
- locators: [{ xpath: args.selector }],
20
+ locators: [{ name: "xpath", value: args.selector }],
21
21
  platform: args.platform
22
22
  }]
23
23
  };
@@ -12,7 +12,7 @@ const MOB_WaitTillElementIsEnabled = async (args) => {
12
12
  elementsData: [{
13
13
  name: args.elementName,
14
14
  type: args.elementType,
15
- locators: [{ "xpath": args.selector }],
15
+ locators: [{ "name": "xpath", "value": args.selector }],
16
16
  platform: args.platform
17
17
  }]
18
18
  };
@@ -12,7 +12,7 @@ const MOB_WaitTillElementIsInvisible = async (args) => {
12
12
  elementsData: [{
13
13
  name: args.elementName,
14
14
  type: args.elementType,
15
- locators: [{ "xpath": args.selector }],
15
+ locators: [{ "name": "xpath", "value": args.selector }],
16
16
  platform: args.platform
17
17
  }]
18
18
  };
@@ -12,7 +12,7 @@ const MOB_WaitTillElementIsSelected = async (args) => {
12
12
  elementsData: [{
13
13
  name: args.elementName,
14
14
  type: args.elementType,
15
- locators: [{ "xpath": args.selector }],
15
+ locators: [{ "name": "xpath", "value": args.selector }],
16
16
  platform: args.platform
17
17
  }]
18
18
  };
@@ -12,7 +12,7 @@ const MOB_WaitTillElementIsVisible = async (args) => {
12
12
  elementsData: [{
13
13
  name: args.elementName,
14
14
  type: args.elementType,
15
- locators: [{ "xpath": args.selector }],
15
+ locators: [{ "name": "xpath", "value": args.selector }],
16
16
  platform: args.platform
17
17
  }]
18
18
  };
@@ -12,7 +12,7 @@ const MOB_WaitTillStalenessOfElement = async (args) => {
12
12
  elementsData: [{
13
13
  name: args.elementName,
14
14
  type: args.elementType,
15
- locators: [{ "xpath": args.selector }],
15
+ locators: [{ "name": "xpath", "value": args.selector }],
16
16
  platform: args.platform
17
17
  }]
18
18
  };
@@ -505,6 +505,7 @@ export interface VerifyCheckBoxIsNotSelectedInterface {
505
505
  driver: WebdriverIO.Browser;
506
506
  pageDOM: string;
507
507
  selector: string;
508
+ value: string;
508
509
  fireflinkIndex: string;
509
510
  elementName: string;
510
511
  elementType: string;
@@ -23,7 +23,8 @@ export declare class MobileSession {
23
23
  private currentAppPackage;
24
24
  private cloudSessionInstances;
25
25
  private isCloud;
26
- constructor(appiumPort: number, isCloud: boolean | undefined, capabilities: Record<string, string | boolean> | undefined, CloudConfig: CloudConfig | undefined);
26
+ private adbPath;
27
+ constructor(appiumPort: number, isCloud: boolean | undefined, capabilities: Record<string, string | boolean> | undefined, CloudConfig: CloudConfig | undefined, adbPath: string | undefined);
27
28
  private openApp;
28
29
  open(arg: {
29
30
  capabilities: IMobileCapabilities;