@playq/core 0.2.77

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 (225) hide show
  1. package/README.md +41 -0
  2. package/bin/playq.js +175 -0
  3. package/cucumber.js +10 -0
  4. package/dist/exec/featureFileCache.d.ts +21 -0
  5. package/dist/exec/featureFileCache.js +124 -0
  6. package/dist/exec/featureFilePreProcess.d.ts +12 -0
  7. package/dist/exec/featureFilePreProcess.js +208 -0
  8. package/dist/exec/preLoader.d.ts +1 -0
  9. package/dist/exec/preLoader.js +72 -0
  10. package/dist/exec/preProcessEntry.d.ts +1 -0
  11. package/dist/exec/preProcessEntry.js +83 -0
  12. package/dist/exec/preProcess_old_todelete.d.ts +1 -0
  13. package/dist/exec/preProcess_old_todelete.js +258 -0
  14. package/dist/exec/runner.d.ts +1 -0
  15. package/dist/exec/runner.js +221 -0
  16. package/dist/exec/runner_orchestrator.d.ts +1 -0
  17. package/dist/exec/runner_orchestrator.js +85 -0
  18. package/dist/exec/sgGenerator.d.ts +11 -0
  19. package/dist/exec/sgGenerator.js +310 -0
  20. package/dist/global.d.ts +15 -0
  21. package/dist/global.js +185 -0
  22. package/dist/helper/actions/api/apiRequestActions.d.ts +117 -0
  23. package/dist/helper/actions/api/apiRequestActions.js +374 -0
  24. package/dist/helper/actions/api/apiValidationActions.d.ts +119 -0
  25. package/dist/helper/actions/api/apiValidationActions.js +615 -0
  26. package/dist/helper/actions/apiActions.d.ts +18 -0
  27. package/dist/helper/actions/apiActions.js +34 -0
  28. package/dist/helper/actions/apiStepDefs.d.ts +1 -0
  29. package/dist/helper/actions/apiStepDefs.js +64 -0
  30. package/dist/helper/actions/comm/commonActions.d.ts +58 -0
  31. package/dist/helper/actions/comm/commonActions.js +198 -0
  32. package/dist/helper/actions/comm/utilityActions.d.ts +131 -0
  33. package/dist/helper/actions/comm/utilityActions.js +351 -0
  34. package/dist/helper/actions/commActions.d.ts +18 -0
  35. package/dist/helper/actions/commActions.js +34 -0
  36. package/dist/helper/actions/commStepDefs.d.ts +1 -0
  37. package/dist/helper/actions/commStepDefs.js +57 -0
  38. package/dist/helper/actions/stepGroupStepDefs.d.ts +1 -0
  39. package/dist/helper/actions/stepGroupStepDefs.js +15 -0
  40. package/dist/helper/actions/web/alertActions.d.ts +61 -0
  41. package/dist/helper/actions/web/alertActions.js +224 -0
  42. package/dist/helper/actions/web/cookieActions.d.ts +45 -0
  43. package/dist/helper/actions/web/cookieActions.js +186 -0
  44. package/dist/helper/actions/web/downloadActions.d.ts +40 -0
  45. package/dist/helper/actions/web/downloadActions.js +153 -0
  46. package/dist/helper/actions/web/elementReaderActions.d.ts +95 -0
  47. package/dist/helper/actions/web/elementReaderActions.js +326 -0
  48. package/dist/helper/actions/web/formActions.d.ts +122 -0
  49. package/dist/helper/actions/web/formActions.js +423 -0
  50. package/dist/helper/actions/web/iframeActions.d.ts +23 -0
  51. package/dist/helper/actions/web/iframeActions.js +108 -0
  52. package/dist/helper/actions/web/javascriptActions.d.ts +14 -0
  53. package/dist/helper/actions/web/javascriptActions.js +77 -0
  54. package/dist/helper/actions/web/keyboardActions.d.ts +35 -0
  55. package/dist/helper/actions/web/keyboardActions.js +118 -0
  56. package/dist/helper/actions/web/localStorageActions.d.ts +51 -0
  57. package/dist/helper/actions/web/localStorageActions.js +163 -0
  58. package/dist/helper/actions/web/mouseActions.d.ts +240 -0
  59. package/dist/helper/actions/web/mouseActions.js +609 -0
  60. package/dist/helper/actions/web/reportingActions.d.ts +34 -0
  61. package/dist/helper/actions/web/reportingActions.js +58 -0
  62. package/dist/helper/actions/web/screenshotActions.d.ts +34 -0
  63. package/dist/helper/actions/web/screenshotActions.js +151 -0
  64. package/dist/helper/actions/web/testDataActions.d.ts +21 -0
  65. package/dist/helper/actions/web/testDataActions.js +211 -0
  66. package/dist/helper/actions/web/validationActions.d.ts +547 -0
  67. package/dist/helper/actions/web/validationActions.js +1754 -0
  68. package/dist/helper/actions/web/waitActions.d.ts +191 -0
  69. package/dist/helper/actions/web/waitActions.js +589 -0
  70. package/dist/helper/actions/web/webNavigation.d.ts +104 -0
  71. package/dist/helper/actions/web/webNavigation.js +288 -0
  72. package/dist/helper/actions/webActions.d.ts +32 -0
  73. package/dist/helper/actions/webActions.js +48 -0
  74. package/dist/helper/actions/webStepDefs.d.ts +1 -0
  75. package/dist/helper/actions/webStepDefs.js +455 -0
  76. package/dist/helper/browsers/browserManager.d.ts +1 -0
  77. package/dist/helper/browsers/browserManager.js +56 -0
  78. package/dist/helper/bundle/defaultEntries.d.ts +6 -0
  79. package/dist/helper/bundle/defaultEntries.js +200 -0
  80. package/dist/helper/bundle/env.d.ts +1 -0
  81. package/dist/helper/bundle/env.js +157 -0
  82. package/dist/helper/bundle/vars.d.ts +9 -0
  83. package/dist/helper/bundle/vars.js +375 -0
  84. package/dist/helper/faker/customFaker.d.ts +55 -0
  85. package/dist/helper/faker/customFaker.js +45 -0
  86. package/dist/helper/faker/modules/data/postcodes_valid_sg.json +17 -0
  87. package/dist/helper/faker/modules/dateTime.d.ts +18 -0
  88. package/dist/helper/faker/modules/dateTime.js +106 -0
  89. package/dist/helper/faker/modules/mobile.d.ts +4 -0
  90. package/dist/helper/faker/modules/mobile.js +59 -0
  91. package/dist/helper/faker/modules/nric.d.ts +32 -0
  92. package/dist/helper/faker/modules/nric.js +84 -0
  93. package/dist/helper/faker/modules/passport.d.ts +3 -0
  94. package/dist/helper/faker/modules/passport.js +36 -0
  95. package/dist/helper/faker/modules/person.d.ts +14 -0
  96. package/dist/helper/faker/modules/person.js +73 -0
  97. package/dist/helper/faker/modules/postcode.d.ts +6 -0
  98. package/dist/helper/faker/modules/postcode.js +47 -0
  99. package/dist/helper/fixtures/locAggregate.d.ts +7 -0
  100. package/dist/helper/fixtures/locAggregate.js +94 -0
  101. package/dist/helper/fixtures/logFixture.d.ts +8 -0
  102. package/dist/helper/fixtures/logFixture.js +56 -0
  103. package/dist/helper/fixtures/webFixture.d.ts +19 -0
  104. package/dist/helper/fixtures/webFixture.js +186 -0
  105. package/dist/helper/fixtures/webLocFixture.d.ts +2 -0
  106. package/dist/helper/fixtures/webLocFixture.js +144 -0
  107. package/dist/helper/report/allureStepLogger.d.ts +0 -0
  108. package/dist/helper/report/allureStepLogger.js +25 -0
  109. package/dist/helper/report/customiseReport.d.ts +1 -0
  110. package/dist/helper/report/customiseReport.js +55 -0
  111. package/dist/helper/report/init.d.ts +1 -0
  112. package/dist/helper/report/init.js +14 -0
  113. package/dist/helper/report/report.d.ts +1 -0
  114. package/dist/helper/report/report.js +102 -0
  115. package/dist/helper/util/dataLoader.d.ts +10 -0
  116. package/dist/helper/util/dataLoader.js +73 -0
  117. package/dist/helper/util/logger.d.ts +4 -0
  118. package/dist/helper/util/logger.js +61 -0
  119. package/dist/helper/util/session/sessionUtil.d.ts +26 -0
  120. package/dist/helper/util/session/sessionUtil.js +729 -0
  121. package/dist/helper/util/stepHelpers.d.ts +2 -0
  122. package/dist/helper/util/stepHelpers.js +16 -0
  123. package/dist/helper/util/test-data/dataLoader.d.ts +7 -0
  124. package/dist/helper/util/test-data/dataLoader.js +145 -0
  125. package/dist/helper/util/test-data/dataTest.d.ts +10 -0
  126. package/dist/helper/util/test-data/dataTest.js +216 -0
  127. package/dist/helper/util/totp/totpHelper.d.ts +38 -0
  128. package/dist/helper/util/totp/totpHelper.js +117 -0
  129. package/dist/helper/util/utilities/cryptoUtil.d.ts +2 -0
  130. package/dist/helper/util/utilities/cryptoUtil.js +53 -0
  131. package/dist/helper/util/utilities/schemaGeneratorUtil.d.ts +2 -0
  132. package/dist/helper/util/utilities/schemaGeneratorUtil.js +129 -0
  133. package/dist/helper/util/utils.d.ts +2 -0
  134. package/dist/helper/util/utils.js +22 -0
  135. package/dist/helper/wrapper/PlaywrightWrappers.d.ts +8 -0
  136. package/dist/helper/wrapper/PlaywrightWrappers.js +26 -0
  137. package/dist/helper/wrapper/assert.d.ts +9 -0
  138. package/dist/helper/wrapper/assert.js +23 -0
  139. package/dist/index.d.ts +7 -0
  140. package/dist/index.js +57 -0
  141. package/dist/scripts/get-versions.d.ts +1 -0
  142. package/dist/scripts/get-versions.js +98 -0
  143. package/dist/scripts/posttest.d.ts +1 -0
  144. package/dist/scripts/posttest.js +29 -0
  145. package/dist/scripts/pretest.d.ts +1 -0
  146. package/dist/scripts/pretest.js +57 -0
  147. package/dist/scripts/util.d.ts +1 -0
  148. package/dist/scripts/util.js +376 -0
  149. package/package.json +68 -0
  150. package/src/exec/featureFileCache.ts +80 -0
  151. package/src/exec/featureFilePreProcess.ts +239 -0
  152. package/src/exec/preLoader.ts +72 -0
  153. package/src/exec/preProcessEntry.ts +59 -0
  154. package/src/exec/preProcess_old_todelete.ts +289 -0
  155. package/src/exec/runner.ts +241 -0
  156. package/src/exec/runnerCuke.js +90 -0
  157. package/src/exec/runner_orchestrator.ts +91 -0
  158. package/src/exec/sgGenerator.ts +373 -0
  159. package/src/global.ts +130 -0
  160. package/src/helper/actions/api/apiRequestActions.ts +362 -0
  161. package/src/helper/actions/api/apiValidationActions.ts +594 -0
  162. package/src/helper/actions/apiActions.ts +18 -0
  163. package/src/helper/actions/apiStepDefs.ts +80 -0
  164. package/src/helper/actions/comm/commonActions.ts +165 -0
  165. package/src/helper/actions/comm/utilityActions.ts +344 -0
  166. package/src/helper/actions/commActions.ts +18 -0
  167. package/src/helper/actions/commStepDefs.ts +72 -0
  168. package/src/helper/actions/stepGroupStepDefs.ts +17 -0
  169. package/src/helper/actions/web/alertActions.ts +179 -0
  170. package/src/helper/actions/web/cookieActions.ts +124 -0
  171. package/src/helper/actions/web/downloadActions.ts +129 -0
  172. package/src/helper/actions/web/elementReaderActions.ts +323 -0
  173. package/src/helper/actions/web/formActions.ts +469 -0
  174. package/src/helper/actions/web/iframeActions.ts +67 -0
  175. package/src/helper/actions/web/javascriptActions.ts +38 -0
  176. package/src/helper/actions/web/keyboardActions.ts +101 -0
  177. package/src/helper/actions/web/localStorageActions.ts +109 -0
  178. package/src/helper/actions/web/mouseActions.ts +864 -0
  179. package/src/helper/actions/web/reportingActions.ts +53 -0
  180. package/src/helper/actions/web/screenshotActions.ts +124 -0
  181. package/src/helper/actions/web/testDataActions.ts +162 -0
  182. package/src/helper/actions/web/validationActions.ts +2287 -0
  183. package/src/helper/actions/web/waitActions.ts +757 -0
  184. package/src/helper/actions/web/webNavigation.ts +313 -0
  185. package/src/helper/actions/webActions.ts +33 -0
  186. package/src/helper/actions/webStepDefs.ts +505 -0
  187. package/src/helper/browsers/browserManager.ts +23 -0
  188. package/src/helper/bundle/defaultEntries.ts +208 -0
  189. package/src/helper/bundle/env.ts +119 -0
  190. package/src/helper/bundle/vars.ts +368 -0
  191. package/src/helper/faker/customFaker.ts +107 -0
  192. package/src/helper/faker/modules/data/postcodes_valid_sg.json +17 -0
  193. package/src/helper/faker/modules/dateTime.ts +121 -0
  194. package/src/helper/faker/modules/mobile.ts +58 -0
  195. package/src/helper/faker/modules/nric.ts +109 -0
  196. package/src/helper/faker/modules/passport.ts +34 -0
  197. package/src/helper/faker/modules/person.ts +93 -0
  198. package/src/helper/faker/modules/postcode.ts +57 -0
  199. package/src/helper/fixtures/locAggregate.ts +61 -0
  200. package/src/helper/fixtures/logFixture.ts +57 -0
  201. package/src/helper/fixtures/webFixture.ts +206 -0
  202. package/src/helper/fixtures/webLocFixture.ts +143 -0
  203. package/src/helper/report/allureStepLogger.ts +26 -0
  204. package/src/helper/report/customiseReport.ts +61 -0
  205. package/src/helper/report/init.ts +18 -0
  206. package/src/helper/report/report.ts +72 -0
  207. package/src/helper/util/dataLoader.ts +42 -0
  208. package/src/helper/util/logger.ts +32 -0
  209. package/src/helper/util/session/sessionUtil.ts +839 -0
  210. package/src/helper/util/stepHelpers.ts +14 -0
  211. package/src/helper/util/test-data/dataLoader.ts +108 -0
  212. package/src/helper/util/test-data/dataTest.ts +191 -0
  213. package/src/helper/util/test-data/registerUser.json +7 -0
  214. package/src/helper/util/totp/totpHelper.ts +102 -0
  215. package/src/helper/util/utilities/cryptoUtil.ts +53 -0
  216. package/src/helper/util/utilities/schemaGeneratorUtil.ts +143 -0
  217. package/src/helper/util/utils.ts +28 -0
  218. package/src/helper/wrapper/PlaywrightWrappers.ts +28 -0
  219. package/src/helper/wrapper/assert.ts +25 -0
  220. package/src/index.ts +17 -0
  221. package/src/scripts/get-versions.ts +68 -0
  222. package/src/scripts/posttest.ts +32 -0
  223. package/src/scripts/pretest.ts +48 -0
  224. package/src/scripts/util.ts +406 -0
  225. package/tsconfig.json +30 -0
@@ -0,0 +1,609 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.click = click;
37
+ exports.mouseoverOnLink = mouseoverOnLink;
38
+ exports.mouseoverOnText = mouseoverOnText;
39
+ exports.clickButton = clickButton;
40
+ exports.clickLink = clickLink;
41
+ exports.clickTab = clickTab;
42
+ exports.clickRadioButton = clickRadioButton;
43
+ exports.clickCheckbox = clickCheckbox;
44
+ exports.clickAtCoordinates = clickAtCoordinates;
45
+ exports.dragAndDrop = dragAndDrop;
46
+ exports.scrollTo = scrollTo;
47
+ exports.scrollUp = scrollUp;
48
+ exports.scrollDown = scrollDown;
49
+ exports.clickAndWaitForNewPage = clickAndWaitForNewPage;
50
+ /**
51
+ * @file mouseActions.ts
52
+ *
53
+ * Mouse interaction helpers for PlayQ web actions.
54
+ * Provides click/hover/drag/scroll utilities with runner-aware step wrappers,
55
+ * locator resolution, and screenshot options.
56
+ *
57
+ * Authors: PlayQ Team
58
+ * Version: v1.0.0
59
+ */
60
+ const allure = __importStar(require("allure-js-commons"));
61
+ const global_1 = require("../../../global");
62
+ // no fs/path usage required in this module
63
+ const waitActions_1 = require("./waitActions");
64
+ const screenshotActions_1 = require("./screenshotActions");
65
+ const vars_1 = require("../../bundle/vars");
66
+ const commActions_1 = require("../commActions");
67
+ // wait helpers provided via waitActions where needed
68
+ const config = {};
69
+ function isPlaywrightRunner() { return process.env.TEST_RUNNER === 'playwright'; }
70
+ const __allureAny_mouse = allure;
71
+ if (typeof __allureAny_mouse.step !== 'function') {
72
+ __allureAny_mouse.step = async (_name, fn) => await fn();
73
+ }
74
+ // Allure compatibility shim: if step is unavailable, just run the body
75
+ const __allureAny_web = allure;
76
+ if (typeof __allureAny_web.step !== 'function') {
77
+ __allureAny_web.step = async (_name, fn) => await fn();
78
+ }
79
+ /**
80
+ * Web: Click Element -field: {param} -options: {param}
81
+ *
82
+ * Clicks an element on the page using the given fieldType.
83
+ *
84
+ * @param page - Playwright Page instance
85
+ * @param field - Label, text, selector, or Locator
86
+ * @param options - Optional JSON string or object:
87
+ * - fieldType: [string] Field type to resolve (button | action | div | text | link etc.)
88
+ * - actionTimeout: [number] Timeout in ms
89
+ * - pattern: [string] PatternIQ config override
90
+ * - isDoubleClick: [boolean]
91
+ * - screenshot: [boolean]
92
+ * - screenshotBefore: [boolean]
93
+ * - screenshotText: [string]
94
+ * - screenshotFullPage: [boolean]
95
+ */
96
+ async function click(page, field, options) {
97
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
98
+ const { fieldType = "button", actionTimeout = Number(global_1.vars.getConfigValue("testExecution.actionTimeout")), pattern, isDoubleClick = false, screenshot = false, screenshotBefore = false, screenshotText = "", screenshotFullPage = true, } = options_json;
99
+ if (isPlaywrightRunner()) {
100
+ await __allureAny_mouse.step(`Web: Click -field: ${field} -fieldType: ${fieldType} -options: ${JSON.stringify(options_json)}`, async () => {
101
+ await doClick();
102
+ });
103
+ }
104
+ else {
105
+ await doClick();
106
+ }
107
+ async function doClick() {
108
+ if (!page)
109
+ throw new Error("Page not initialized");
110
+ const target = typeof field === "string"
111
+ ? await (0, global_1.webLocResolver)(fieldType, field, page, pattern, actionTimeout, "after")
112
+ : field;
113
+ await (0, screenshotActions_1.processScreenshot)(page, screenshotBefore, screenshotText, screenshotFullPage);
114
+ if (isDoubleClick) {
115
+ await target.dblclick();
116
+ }
117
+ else {
118
+ await target.click();
119
+ }
120
+ await page.waitForLoadState("load");
121
+ await (0, screenshotActions_1.processScreenshot)(page, screenshot, screenshotText, screenshotFullPage);
122
+ }
123
+ }
124
+ /**
125
+ * Web: Mouseover on link -field: {param} -options: {param}
126
+ *
127
+ * Performs a mouse hover over a link element on the page, identified by text, label, id, name, or pattern.
128
+ *
129
+ * @param field - The text, label, id, name, or selector of the link to hover over (e.g., "Account", "Login", "Help").
130
+ * @param options - Optional JSON string or object:
131
+ * - actionTimeout: [number] Optional timeout in milliseconds for waiting. Default: Configured timeout.
132
+ * - pattern: [string] Optional pattern to refine element search. Default: Configured pattern.
133
+ * - screenshot: [boolean] Capture a screenshot after hovering over the link. Default: false.
134
+ * - screenshotText: [string] Text description for the screenshot. Default: "".
135
+ * - screenshotFullPage: [boolean] Capture full page screenshot. Default: true.
136
+ *
137
+ * @example
138
+ * Web: Mouseover on link -field: "{{top_menu}} My account" -options: "{screenshot: true, screenshotText: 'Hovered on My Account'}"
139
+ */
140
+ async function mouseoverOnLink(page, field, options) {
141
+ const resolvedField = typeof field === "string" ? global_1.vars.replaceVariables(field) : undefined;
142
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
143
+ const { actionTimeout, pattern, screenshot = false, screenshotText = "", screenshotFullPage = true, } = options_json || {};
144
+ if (isPlaywrightRunner()) {
145
+ await __allureAny_mouse.step(`Web: Mouseover on link -field: ${resolvedField || field} -options: ${JSON.stringify(options_json)}`, async () => {
146
+ await doMouseoverOnLink();
147
+ });
148
+ }
149
+ else {
150
+ await doMouseoverOnLink();
151
+ }
152
+ async function doMouseoverOnLink() { }
153
+ if (!page)
154
+ throw new Error("Page not initialized");
155
+ const target = typeof field === "string"
156
+ ? await (0, global_1.webLocResolver)("link", resolvedField, page, pattern, actionTimeout)
157
+ : field;
158
+ await target.hover();
159
+ await page.waitForLoadState("networkidle");
160
+ await (0, screenshotActions_1.processScreenshot)(page, screenshot, screenshotText, screenshotFullPage);
161
+ }
162
+ /**
163
+ * Web: Mouseover on text -text: {param} -options: {param}
164
+ *
165
+ * Performs a mouse hover over an element identified by its visible text.
166
+ *
167
+ * @param page - Playwright Page instance
168
+ * @param text - The visible text of the element to hover over
169
+ * @param options - Optional string or object:
170
+ * - actionTimeout: [number] Optional timeout in milliseconds for waiting. Default: Configured timeout.
171
+ * - pattern: [string] Optional pattern to refine element search.
172
+ * - screenshot: [boolean] Capture a screenshot after hovering. Default: false.
173
+ * - screenshotText: [string] Description for the screenshot.
174
+ * - screenshotFullPage: [boolean] Capture full page screenshot. Default: true.
175
+ *
176
+ * @example
177
+ * Web: Mouseover on text -text: "Menu" -options: "{screenshot: true, screenshotText: 'Hovered on Menu'}"
178
+ */
179
+ async function mouseoverOnText(page, text, options) {
180
+ const resolvedText = global_1.vars.replaceVariables(text);
181
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
182
+ const { actionTimeout = Number(global_1.vars.getConfigValue("testExecution.actionTimeout")), pattern, screenshot = false, screenshotText = "", screenshotFullPage = true, } = options_json;
183
+ if (isPlaywrightRunner()) {
184
+ await __allureAny_mouse.step(`Web: Mouseover on text -text: ${resolvedText} -options: ${JSON.stringify(options_json)}`, async () => {
185
+ await doMouseoverOnText();
186
+ });
187
+ }
188
+ else {
189
+ await doMouseoverOnText();
190
+ }
191
+ async function doMouseoverOnText() {
192
+ if (!page)
193
+ throw new Error("Page not initialized");
194
+ // Use webLocResolver to find the element by text
195
+ const target = await (0, global_1.webLocResolver)("text", resolvedText, page, pattern, actionTimeout);
196
+ await target.hover({ timeout: actionTimeout });
197
+ await (0, screenshotActions_1.processScreenshot)(page, screenshot, screenshotText || `Hovered on text: ${resolvedText}`, screenshotFullPage);
198
+ }
199
+ }
200
+ /**
201
+ * Web: Click Button -field: {param} -options: {param}
202
+ *
203
+ * Clicks a button element on the page, identified by text, label, id, name, pattern, or locator.
204
+ *
205
+ * @param field - The label, text, id, name, or selector of the button to click (e.g., "Submit", "Save", "Cancel").
206
+ * @param options - Optional JSON string or object:
207
+ * - actionTimeout: [number] Optional timeout in milliseconds for waiting. Default: Configured testExecution > actionTimeout or 10000 milliseconds.
208
+ * - pattern: [string] Optional pattern to refine element search. Default: Configured pattern.
209
+ * - screenshot: [boolean] Capture a screenshot after clicking the button. Default: false.
210
+ * - screenshotText: [string] Text description for the screenshot. Default: "".
211
+ * - screenshotFullPage: [boolean] Capture full page screenshot. Default: true.
212
+ * - screenshotBefore: [boolean] Capture a screenshot before clicking. Default: false.
213
+ *
214
+ * @example
215
+ * Web: Click Button -field: "Register" -options: "{screenshot: true, screenshotText: 'After clicking Register'}"
216
+ */
217
+ async function clickButton(page, field, options) {
218
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
219
+ const { actionTimeout = Number(global_1.vars.getConfigValue("testExecution.actionTimeout")), pattern, isDoubleClick = false, screenshot = false, screenshotText = "", screenshotFullPage = true, screenshotBefore = false, } = options_json || {};
220
+ if (isPlaywrightRunner()) {
221
+ await __allureAny_mouse.step(`Web: Click Button -field: ${field} -options: ${JSON.stringify(options_json)}`, async () => {
222
+ await doClickButton();
223
+ });
224
+ }
225
+ else {
226
+ await doClickButton();
227
+ }
228
+ async function doClickButton() {
229
+ if (!page)
230
+ throw new Error("Page not initialized");
231
+ const target = typeof field === "string"
232
+ ? await (0, global_1.webLocResolver)("button", field, page, pattern, actionTimeout, "after")
233
+ : field;
234
+ await (0, screenshotActions_1.processScreenshot)(page, screenshotBefore, screenshotText, screenshotFullPage);
235
+ await target.click();
236
+ await page.waitForLoadState("load");
237
+ await (0, screenshotActions_1.processScreenshot)(page, screenshot, screenshotText, screenshotFullPage);
238
+ }
239
+ }
240
+ /**
241
+ * Web: Click Link -field: {param} -options: {param}
242
+ *
243
+ * Clicks a link element on the page, identified by link text, label, id, name, or pattern.
244
+ *
245
+ * @param field - The text, label, id, name, or selector of the link to click (e.g., "Home", "Login", "Forgot Password").
246
+ * @param options - Optional JSON string or object:
247
+ * - actionTimeout: [number] Optional timeout in milliseconds for waiting. Default: Configured timeout.
248
+ * - pattern: [string] Optional pattern to refine element search. Default: Configured pattern.
249
+ * - screenshot: [boolean] Capture a screenshot after clicking the link. Default: false.
250
+ * - screenshotText: [string] Text description for the screenshot. Default: "".
251
+ * - screenshotFullPage: [boolean] Capture full page screenshot. Default: true.
252
+ * - screenshotBefore: [boolean] Capture a screenshot before clicking. Default: false.
253
+ *
254
+ * @example
255
+ * Web: Click Link -field: "Register" -options: "{screenshot: true, screenshotText: 'After clicking Register'}"
256
+ */
257
+ async function clickLink(page, field, options) {
258
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
259
+ const { actionTimeout = Number(global_1.vars.getConfigValue("testExecution.actionTimeout")), pattern, screenshot = false, screenshotText = "", screenshotFullPage = true, screenshotBefore = false, } = options_json || {};
260
+ if (isPlaywrightRunner()) {
261
+ await __allureAny_mouse.step(`Web: Click Link -field: ${field} -options: ${JSON.stringify(options_json)}`, async () => {
262
+ await doClickLink();
263
+ });
264
+ }
265
+ else {
266
+ await doClickLink();
267
+ }
268
+ async function doClickLink() {
269
+ if (!page)
270
+ throw new Error("Page not initialized");
271
+ await (0, waitActions_1.waitForPageToLoad)(page, actionTimeout);
272
+ const target = typeof field === "string"
273
+ ? await (0, global_1.webLocResolver)("link", field, page, pattern, actionTimeout)
274
+ : field;
275
+ await (0, screenshotActions_1.processScreenshot)(page, screenshotBefore, screenshotText, screenshotFullPage);
276
+ await target.click({ timeout: actionTimeout });
277
+ await (0, screenshotActions_1.processScreenshot)(page, screenshot, screenshotText, screenshotFullPage);
278
+ }
279
+ }
280
+ /**
281
+ * Web: Click tab -field: {param} -options: {param}
282
+ *
283
+ * Clicks a tab element on the page, identified by link text, label, id, name, or pattern.
284
+ *
285
+ * @param field - The text, label, id, name, or selector of the link to click (e.g., "Home", "Login", "Forgot Password").
286
+ * @param options - Optional JSON string or object:
287
+ * - actionTimeout: [number] Optional timeout in milliseconds for waiting. Default: Configured timeout.
288
+ * - pattern: [string] Optional pattern to refine element search. Default: Configured pattern.
289
+ * - screenshot: [boolean] Capture a screenshot after clicking the link. Default: false.
290
+ * - screenshotText: [string] Text description for the screenshot. Default: "".
291
+ * - screenshotFullPage: [boolean] Capture full page screenshot. Default: true.
292
+ * - screenshotBefore: [boolean] Capture a screenshot before clicking. Default: false.
293
+ *
294
+ * @example
295
+ * Web: Click tab -field: "Register" -options: "{screenshot: true, screenshotText: 'After clicking Register'}"
296
+ */
297
+ async function clickTab(page, field, options) {
298
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
299
+ const { actionTimeout = Number(global_1.vars.getConfigValue("testExecution.actionTimeout")), pattern, screenshot = false, screenshotText = "", screenshotFullPage = true, screenshotBefore = false, } = options_json || {};
300
+ if (isPlaywrightRunner()) {
301
+ await __allureAny_mouse.step(`Web: Click Link -field: ${field} -options: ${JSON.stringify(options_json)}`, async () => {
302
+ await doClickTab();
303
+ });
304
+ }
305
+ else {
306
+ await doClickTab();
307
+ }
308
+ async function doClickTab() {
309
+ if (!page)
310
+ throw new Error("Page not initialized");
311
+ await (0, waitActions_1.waitForPageToLoad)(page, actionTimeout);
312
+ const target = typeof field === "string"
313
+ ? await (0, global_1.webLocResolver)("tab", field, page, pattern, actionTimeout)
314
+ : field;
315
+ await (0, screenshotActions_1.processScreenshot)(page, screenshotBefore, screenshotText, screenshotFullPage);
316
+ await target.click({ timeout: actionTimeout });
317
+ await (0, screenshotActions_1.processScreenshot)(page, screenshot, screenshotText, screenshotFullPage);
318
+ }
319
+ }
320
+ /**
321
+ * Web: Click radio button -field: {param} -options: {param}
322
+ *
323
+ * Selects a radio button element on the page, identified by label, text, id, name, or pattern.
324
+ *
325
+ * @param field - The label, text, id, name, or selector of the radio button to select (e.g., "Yes", "No", "Subscribe").
326
+ * @param options - Optional JSON string or object:
327
+ * - actionTimeout: [number] Optional timeout in milliseconds for waiting. Default: Configured timeout.
328
+ * - pattern: [string] Optional pattern to refine element search. Default: Configured pattern.
329
+ * - force: [boolean] Force the action (e.g., ignore actionability checks). Default: true.
330
+ * - screenshot: [boolean] Capture a screenshot after selecting the radio button. Default: false.
331
+ * - screenshotText: [string] Text description for the screenshot. Default: "".
332
+ * - screenshotFullPage: [boolean] Capture a full page screenshot. Default: true.
333
+ * - screenshotBefore: [boolean] Capture a screenshot before selecting the radio button. Default: false.
334
+ *
335
+ * @example
336
+ * Web: Click radio button -field: "{radio_group:: Newsletter} Yes" -options: "{screenshot: true, screenshotText: 'After selecting Yes for Newsletter'}"
337
+ */
338
+ async function clickRadioButton(page, field, options) {
339
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
340
+ const { actionTimeout = Number(global_1.vars.getConfigValue("testExecution.actionTimeout")), pattern, force = true, // Playwright's force option
341
+ screenshot = false, screenshotText = "", screenshotFullPage = true, screenshotBefore = false, smartIQ_refreshLoc = "", } = options_json || {};
342
+ if (isPlaywrightRunner()) {
343
+ await __allureAny_mouse.step(`Web: Click radio button -field: ${field} -options: ${JSON.stringify(options_json)}`, async () => {
344
+ await doClickRadioButton();
345
+ });
346
+ }
347
+ else {
348
+ await doClickRadioButton();
349
+ }
350
+ async function doClickRadioButton() {
351
+ if (!page)
352
+ throw new Error("Page not initialized");
353
+ const target = typeof field === "string"
354
+ ? await (0, global_1.webLocResolver)("radio", field, page, pattern, smartIQ_refreshLoc)
355
+ : field;
356
+ await (0, screenshotActions_1.processScreenshot)(page, screenshotBefore, screenshotText, screenshotFullPage);
357
+ await target.check({ force, timeout: actionTimeout }); // Playwright's API for selecting radio buttons
358
+ await (0, screenshotActions_1.processScreenshot)(page, screenshot, screenshotText, screenshotFullPage);
359
+ }
360
+ }
361
+ /**
362
+ * Web: Click checkbox -field: {param} -options: {param}
363
+ *
364
+ * Selects a checkbox element on the page, identified by label, text, id, name, or pattern.
365
+ *
366
+ * @param field - The label, text, id, name, or selector of the checkbox to select (e.g., "Agree", "Subscribe").
367
+ * @param options - Optional JSON string or object:
368
+ * - actionTimeout: [number] Optional timeout in milliseconds for waiting. Default: Configured timeout.
369
+ * - pattern: [string] Optional pattern to refine element search. Default: Configured pattern.
370
+ * - force: [boolean] Force the action (e.g., ignore actionability checks). Default: true.
371
+ * - screenshot: [boolean] Capture a screenshot after selecting the checkbox. Default: false.
372
+ * - screenshotText: [string] Text description for the screenshot. Default: "".
373
+ * - screenshotFullPage: [boolean] Capture a full page screenshot. Default: true.
374
+ * - screenshotBefore: [boolean] Capture a screenshot before selecting the checkbox. Default: false.
375
+ *
376
+ * @example
377
+ * Web: Click checkbox -field: "{checkbox_group:: Accept Terms} Agree" -options: "{screenshot: true, screenshotText: 'After selecting Agree for Accept Terms'}"
378
+ */
379
+ async function clickCheckbox(page, field, options) {
380
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
381
+ const { actionTimeout = Number(global_1.vars.getConfigValue("testExecution.actionTimeout")), pattern, force = true, // Playwright's force option
382
+ screenshot = false, screenshotText = "", screenshotFullPage = true, screenshotBefore = false, smartIQ_refreshLoc = "", } = options_json || {};
383
+ if (isPlaywrightRunner()) {
384
+ await __allureAny_mouse.step(`Web: Click radio button -field: ${field} -options: ${JSON.stringify(options_json)}`, async () => {
385
+ await doClickCheckbox();
386
+ });
387
+ }
388
+ else {
389
+ await doClickCheckbox();
390
+ }
391
+ async function doClickCheckbox() {
392
+ if (!page)
393
+ throw new Error("Page not initialized");
394
+ const target = typeof field === "string"
395
+ ? await (0, global_1.webLocResolver)("checkbox", field, page, pattern, smartIQ_refreshLoc)
396
+ : field;
397
+ await (0, screenshotActions_1.processScreenshot)(page, screenshotBefore, screenshotText, screenshotFullPage);
398
+ await target.check({ force, timeout: actionTimeout }); // Playwright's API for selecting radio buttons
399
+ await (0, screenshotActions_1.processScreenshot)(page, screenshot, screenshotText, screenshotFullPage);
400
+ }
401
+ }
402
+ /**
403
+ * Web: Click at Coordinates -x: {param} -y: {param} -options: {param}
404
+ *
405
+ * Clicks at the specified page coordinates (default: 0,0).
406
+ *
407
+ * @param page - Playwright Page instance
408
+ * @param x - X coordinate (default: 0)
409
+ * @param y - Y coordinate (default: 0)
410
+ * @param options - Optional string or object:
411
+ * - screenshot: [boolean] Capture screenshot after clicking (default: false)
412
+ * - screenshotText: [string] Description for screenshot
413
+ * - screenshotFullPage: [boolean] Full page screenshot (default: true)
414
+ *
415
+ * @example
416
+ * await clickAtCoordinates(page); // Clicks at (0,0)
417
+ * await clickAtCoordinates(page, 100, 200, { screenshot: true });
418
+ */
419
+ async function clickAtCoordinates(page, x = 0, y = 0, options) {
420
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
421
+ const { screenshot = false, screenshotText = "", screenshotFullPage = true, } = options_json;
422
+ if (!page)
423
+ throw new Error("Page not initialized");
424
+ if (isPlaywrightRunner()) {
425
+ await __allureAny_mouse.step(`Web: Click at Coordinates -x: ${x} -y: ${y} -options: ${JSON.stringify(options_json)}`, async () => {
426
+ await doClickAtCoordinates();
427
+ });
428
+ }
429
+ else {
430
+ await doClickAtCoordinates();
431
+ }
432
+ async function doClickAtCoordinates() {
433
+ await page.mouse.click(x, y);
434
+ await (0, commActions_1.attachLog)(`✅ Clicked at coordinates (${x}, ${y})`, "text/plain");
435
+ await (0, screenshotActions_1.processScreenshot)(page, screenshot, screenshotText || `Clicked at coordinates (${x}, ${y})`, screenshotFullPage);
436
+ }
437
+ }
438
+ /**
439
+ * Web: Drag and Drop -source: {param} -target: {param} -options: {param}
440
+ *
441
+ * Drags an element from source to target location.
442
+ *
443
+ * @param page Playwright Page instance
444
+ * @param source The source element to drag (label, text, id, name, or selector).
445
+ * @param target The target element to drop onto (label, text, id, name, or selector).
446
+ * @param options Optional JSON string or object:
447
+ * - fieldType: [string] Type of the elements (e.g., "item", "icon"). Default: "".
448
+ * - actionTimeout: [number] Optional timeout in milliseconds for waiting. Default: Configured timeout.
449
+ * - pattern: [string] Optional pattern to refine element search. Default: Configured pattern.
450
+ * - screenshot: [boolean] Capture a screenshot after drag and drop. Default: false.
451
+ * - screenshotText: [string] Text description for the screenshot. Default: "".
452
+ * - screenshotFullPage: [boolean] Capture a full page screenshot. Default: true.
453
+ * - screenshotBefore: [boolean] Capture a screenshot before drag and drop. Default: false.
454
+ *
455
+ * @example
456
+ * Web: Drag and Drop -source: "Item A" -target: "Item B" -options: "{screenshot: true, screenshotText: 'After drag and drop'}"
457
+ */
458
+ async function dragAndDrop(page, source, target, options) {
459
+ const options_json = typeof options === 'string' ? global_1.vars.parseLooseJson(options) : options || {};
460
+ const src = typeof source === 'string'
461
+ ? await (0, global_1.webLocResolver)((options_json === null || options_json === void 0 ? void 0 : options_json.fieldType) || '', source, page, options_json === null || options_json === void 0 ? void 0 : options_json.pattern, typeof (options_json === null || options_json === void 0 ? void 0 : options_json.actionTimeout) === 'number' ? options_json.actionTimeout : undefined, (options_json === null || options_json === void 0 ? void 0 : options_json.smartAiRefresh) || '')
462
+ : source;
463
+ const dst = typeof target === 'string'
464
+ ? await (0, global_1.webLocResolver)((options_json === null || options_json === void 0 ? void 0 : options_json.fieldType) || '', target, page, options_json === null || options_json === void 0 ? void 0 : options_json.pattern, typeof (options_json === null || options_json === void 0 ? void 0 : options_json.actionTimeout) === 'number' ? options_json.actionTimeout : undefined, (options_json === null || options_json === void 0 ? void 0 : options_json.smartAiRefresh) || '')
465
+ : target;
466
+ const stepName = `Web: Drag And Drop -source: ${typeof source === 'string' ? source : '<locator>'} -target: ${typeof target === 'string' ? target : '<locator>'}`;
467
+ if (isPlaywrightRunner()) {
468
+ await __allureAny_mouse.step(stepName, async () => { await src.dragTo(dst); });
469
+ }
470
+ else {
471
+ await src.dragTo(dst);
472
+ }
473
+ }
474
+ /**
475
+ * Web: Scroll To -x: {param} -y: {param} -options: {param}
476
+ *
477
+ * Scrolls the page to the specified x and y coordinates.
478
+ *
479
+ * @param page Playwright Page instance
480
+ * @param x The x-coordinate to scroll to.
481
+ * @param y The y-coordinate to scroll to.
482
+ * @param options Optional JSON string or object (reserved for future use).
483
+ *
484
+ * @example
485
+ * Web: Scroll To -x: 0 -y: 500 -options: "{}"
486
+ */
487
+ async function scrollTo(page, x, y, options) {
488
+ const options_json = typeof options === 'string' ? global_1.vars.parseLooseJson(options) : options || {};
489
+ const stepName = `Web: Scroll To -x: ${x} -y: ${y}`;
490
+ if (isPlaywrightRunner()) {
491
+ await __allureAny_mouse.step(stepName, async () => {
492
+ await page.evaluate(([px, py]) => window.scrollTo(px, py), [x, y]);
493
+ });
494
+ }
495
+ else {
496
+ await page.evaluate(([px, py]) => window.scrollTo(px, py), [x, y]);
497
+ }
498
+ }
499
+ /**
500
+ * Web: Scroll Up -amount: {param} -options: {param}
501
+ *
502
+ * Scrolls the page up by the specified amount.
503
+ *
504
+ * @param page Playwright Page instance
505
+ * @param amount The amount in pixels to scroll up (default: 200).
506
+ * @param options Optional JSON string or object (reserved for future use).
507
+ *
508
+ * @example
509
+ * Web: Scroll Up -amount: 300 -options: "{}"
510
+ */
511
+ async function scrollUp(page, amount = 200, options) {
512
+ return scrollBy(page, -Math.abs(amount), options);
513
+ }
514
+ /**
515
+ * Web: Scroll Down -amount: {param} -options: {param}
516
+ *
517
+ * Scrolls the page down by the specified amount.
518
+ *
519
+ * @param page Playwright Page instance
520
+ * @param amount The amount in pixels to scroll down (default: 200).
521
+ * @param options Optional JSON string or object (reserved for future use).
522
+ *
523
+ * @example
524
+ * Web: Scroll Down -amount: 300 -options: "{}"
525
+ */
526
+ async function scrollDown(page, amount = 200, options) {
527
+ return scrollBy(page, Math.abs(amount), options);
528
+ }
529
+ /**
530
+ * Web: Scroll By -dy: {param} -options: {param}
531
+ *
532
+ * Scrolls the page vertically by the specified amount.
533
+ *
534
+ * @param page Playwright Page instance
535
+ * @param dy The amount in pixels to scroll by (positive for down, negative for up).
536
+ * @param options Optional JSON string or object (reserved for future use).
537
+ *
538
+ * @example
539
+ * Web: Scroll By -dy: 250 -options: "{}"
540
+ */
541
+ async function scrollBy(page, dy, options) {
542
+ /**
543
+ * Web: Scroll By -dy: {param} -options: {param}
544
+ *
545
+ * Scrolls the page vertically by the specified amount.
546
+ * Wraps the action in an Allure step when running under Playwright.
547
+ *
548
+ * @param page - Playwright Page instance
549
+ * @param dy - Pixels to scroll by (positive = down, negative = up)
550
+ * @param options - Optional JSON string or object (reserved)
551
+ */
552
+ const options_json = typeof options === 'string' ? global_1.vars.parseLooseJson(options) : options || {};
553
+ const stepName = `Web: Scroll By -dy: ${dy}`;
554
+ if (isPlaywrightRunner()) {
555
+ await __allureAny_mouse.step(stepName, async () => {
556
+ await page.evaluate((d) => window.scrollBy(0, d), dy);
557
+ });
558
+ }
559
+ else {
560
+ await page.evaluate((d) => window.scrollBy(0, d), dy);
561
+ }
562
+ }
563
+ /**
564
+ * Web: Click and Wait for New Page -field: {param} -options: {param}
565
+ *
566
+ * Clicks a button or link and waits for a new page (tab) to open.
567
+ *
568
+ * @param context - Playwright BrowserContext
569
+ * @param page - Current Playwright Page
570
+ * @param field - The button/link text or locator to click
571
+ * @param options - Options for clickButton/clickLink
572
+ * @returns The new Page object
573
+ *
574
+ * @example
575
+ * const newPage = await clickAndWaitForNewPage(context, page, "Open Tab", { screenshot: true });
576
+ */
577
+ async function clickAndWaitForNewPage(context, page, field, options) {
578
+ const options_json = typeof options === "string" ? (0, vars_1.parseLooseJson)(options) : options || {};
579
+ if (isPlaywrightRunner()) {
580
+ return await __allureAny_web.step(`Web: Click and Wait for New Page -field: ${field} -options: ${JSON.stringify(options_json)}`, async () => {
581
+ return await doClickAndWaitForNewPage();
582
+ });
583
+ }
584
+ else {
585
+ return await doClickAndWaitForNewPage();
586
+ }
587
+ async function doClickAndWaitForNewPage() {
588
+ if (!context)
589
+ throw new Error("BrowserContext not initialized");
590
+ if (!page)
591
+ throw new Error("Page not initialized");
592
+ // Try button first, fallback to link if not found
593
+ let clickFn = clickButton;
594
+ try {
595
+ if (typeof field === "string") {
596
+ await page.waitForSelector(`button:has-text("${field}")`, { timeout: 2000 });
597
+ }
598
+ }
599
+ catch {
600
+ clickFn = clickLink;
601
+ }
602
+ const [newPage] = await Promise.all([
603
+ context.waitForEvent('page'),
604
+ clickFn(page, field, options_json)
605
+ ]);
606
+ await newPage.waitForLoadState('domcontentloaded');
607
+ return newPage;
608
+ }
609
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Web: Log Info -message: {param}
3
+ *
4
+ * Attaches an informational log message to the test report.
5
+ *
6
+ * @param message - Message to attach
7
+ */
8
+ export declare function logInfo(message: string): Promise<void>;
9
+ /**
10
+ * Web: Log Pass -message: {param}
11
+ *
12
+ * Attaches a success log message to the test report.
13
+ *
14
+ * @param message - Message to attach
15
+ */
16
+ export declare function logPass(message: string): Promise<void>;
17
+ /**
18
+ * Web: Log Fail -message: {param}
19
+ *
20
+ * Attaches a failure log message to the test report.
21
+ *
22
+ * @param message - Message to attach
23
+ */
24
+ export declare function logFail(message: string): Promise<void>;
25
+ /**
26
+ * Web: Assert -condition: {param} -message: {param}
27
+ *
28
+ * Asserts a condition and logs pass/fail. Throws on failure.
29
+ *
30
+ * @param condition - Condition to assert
31
+ * @param message - Optional message to include in logs and error
32
+ */
33
+ export declare function assert(condition: boolean, message?: string): Promise<void>;
34
+ export declare const assertLog: typeof assert;