@umbraco/playwright-testhelpers 17.1.0-beta.5 → 17.1.0-beta.7

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 (147) hide show
  1. package/dist/lib/helpers/BaseApiHelper.d.ts +19 -0
  2. package/dist/lib/helpers/BaseApiHelper.js +87 -0
  3. package/dist/lib/helpers/BaseApiHelper.js.map +1 -0
  4. package/dist/lib/helpers/ConstantHelper.d.ts +0 -17
  5. package/dist/lib/helpers/ConstantHelper.js +0 -17
  6. package/dist/lib/helpers/ConstantHelper.js.map +1 -1
  7. package/dist/lib/helpers/ContentRenderUiHelper.js +3 -3
  8. package/dist/lib/helpers/ContentRenderUiHelper.js.map +1 -1
  9. package/dist/lib/helpers/ContentUiHelper.js +487 -353
  10. package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
  11. package/dist/lib/helpers/CurrentUserProfileUiHelper.js +10 -4
  12. package/dist/lib/helpers/CurrentUserProfileUiHelper.js.map +1 -1
  13. package/dist/lib/helpers/DataTypeApiHelper.d.ts +9 -21
  14. package/dist/lib/helpers/DataTypeApiHelper.js +32 -125
  15. package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
  16. package/dist/lib/helpers/DataTypeUiHelper.js +332 -193
  17. package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
  18. package/dist/lib/helpers/DictionaryApiHelper.d.ts +8 -15
  19. package/dist/lib/helpers/DictionaryApiHelper.js +49 -77
  20. package/dist/lib/helpers/DictionaryApiHelper.js.map +1 -1
  21. package/dist/lib/helpers/DictionaryUiHelper.js +23 -17
  22. package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
  23. package/dist/lib/helpers/DocumentBlueprintApiHelper.d.ts +7 -13
  24. package/dist/lib/helpers/DocumentBlueprintApiHelper.js +44 -69
  25. package/dist/lib/helpers/DocumentBlueprintApiHelper.js.map +1 -1
  26. package/dist/lib/helpers/DocumentBlueprintUiHelper.js +10 -8
  27. package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
  28. package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +4 -18
  29. package/dist/lib/helpers/DocumentTypeApiHelper.js +4 -134
  30. package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
  31. package/dist/lib/helpers/DocumentTypeUiHelper.js +34 -22
  32. package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
  33. package/dist/lib/helpers/ExamineManagementUiHelper.js +6 -5
  34. package/dist/lib/helpers/ExamineManagementUiHelper.js.map +1 -1
  35. package/dist/lib/helpers/FormsUiHelper.js +159 -119
  36. package/dist/lib/helpers/FormsUiHelper.js.map +1 -1
  37. package/dist/lib/helpers/HealthCheckUiHelper.js +7 -7
  38. package/dist/lib/helpers/HealthCheckUiHelper.js.map +1 -1
  39. package/dist/lib/helpers/LanguageApiHelper.d.ts +10 -12
  40. package/dist/lib/helpers/LanguageApiHelper.js +34 -35
  41. package/dist/lib/helpers/LanguageApiHelper.js.map +1 -1
  42. package/dist/lib/helpers/LanguageUiHelper.js +19 -16
  43. package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
  44. package/dist/lib/helpers/LogViewerUiHelper.js +31 -22
  45. package/dist/lib/helpers/LogViewerUiHelper.js.map +1 -1
  46. package/dist/lib/helpers/LoginUiHelper.js +7 -4
  47. package/dist/lib/helpers/LoginUiHelper.js.map +1 -1
  48. package/dist/lib/helpers/MediaTypeApiHelper.d.ts +4 -18
  49. package/dist/lib/helpers/MediaTypeApiHelper.js +4 -134
  50. package/dist/lib/helpers/MediaTypeApiHelper.js.map +1 -1
  51. package/dist/lib/helpers/MediaTypeUiHelper.js +17 -11
  52. package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -1
  53. package/dist/lib/helpers/MediaUiHelper.js +45 -36
  54. package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
  55. package/dist/lib/helpers/MemberApiHelper.d.ts +4 -12
  56. package/dist/lib/helpers/MemberApiHelper.js +6 -54
  57. package/dist/lib/helpers/MemberApiHelper.js.map +1 -1
  58. package/dist/lib/helpers/MemberGroupApiHelper.d.ts +6 -11
  59. package/dist/lib/helpers/MemberGroupApiHelper.js +20 -35
  60. package/dist/lib/helpers/MemberGroupApiHelper.js.map +1 -1
  61. package/dist/lib/helpers/MemberGroupUiHelper.js +16 -13
  62. package/dist/lib/helpers/MemberGroupUiHelper.js.map +1 -1
  63. package/dist/lib/helpers/MemberTypeApiHelper.d.ts +5 -12
  64. package/dist/lib/helpers/MemberTypeApiHelper.js +16 -49
  65. package/dist/lib/helpers/MemberTypeApiHelper.js.map +1 -1
  66. package/dist/lib/helpers/MemberTypeUiHelper.js +3 -2
  67. package/dist/lib/helpers/MemberTypeUiHelper.js.map +1 -1
  68. package/dist/lib/helpers/MemberUiHelper.js +43 -25
  69. package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
  70. package/dist/lib/helpers/ModelsBuilderUiHelper.js +3 -2
  71. package/dist/lib/helpers/ModelsBuilderUiHelper.js.map +1 -1
  72. package/dist/lib/helpers/PackageApiHelper.d.ts +5 -4
  73. package/dist/lib/helpers/PackageApiHelper.js +47 -75
  74. package/dist/lib/helpers/PackageApiHelper.js.map +1 -1
  75. package/dist/lib/helpers/PackageUiHelper.js +36 -30
  76. package/dist/lib/helpers/PackageUiHelper.js.map +1 -1
  77. package/dist/lib/helpers/PartialViewApiHelper.d.ts +5 -20
  78. package/dist/lib/helpers/PartialViewApiHelper.js +12 -146
  79. package/dist/lib/helpers/PartialViewApiHelper.js.map +1 -1
  80. package/dist/lib/helpers/PartialViewUiHelper.js +17 -14
  81. package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
  82. package/dist/lib/helpers/PathBasedTreeApiHelper.d.ts +32 -0
  83. package/dist/lib/helpers/PathBasedTreeApiHelper.js +164 -0
  84. package/dist/lib/helpers/PathBasedTreeApiHelper.js.map +1 -0
  85. package/dist/lib/helpers/ProfilingUiHelper.js +5 -3
  86. package/dist/lib/helpers/ProfilingUiHelper.js.map +1 -1
  87. package/dist/lib/helpers/PublishedStatusUiHelper.js +8 -7
  88. package/dist/lib/helpers/PublishedStatusUiHelper.js.map +1 -1
  89. package/dist/lib/helpers/RedirectManagementUiHelper.js +12 -7
  90. package/dist/lib/helpers/RedirectManagementUiHelper.js.map +1 -1
  91. package/dist/lib/helpers/RelationTypeApiHelper.d.ts +7 -12
  92. package/dist/lib/helpers/RelationTypeApiHelper.js +28 -49
  93. package/dist/lib/helpers/RelationTypeApiHelper.js.map +1 -1
  94. package/dist/lib/helpers/RelationTypeUiHelper.js +16 -13
  95. package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
  96. package/dist/lib/helpers/ScriptApiHelper.d.ts +6 -22
  97. package/dist/lib/helpers/ScriptApiHelper.js +12 -165
  98. package/dist/lib/helpers/ScriptApiHelper.js.map +1 -1
  99. package/dist/lib/helpers/ScriptUiHelper.js +13 -9
  100. package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
  101. package/dist/lib/helpers/StylesheetApiHelper.d.ts +5 -20
  102. package/dist/lib/helpers/StylesheetApiHelper.js +13 -154
  103. package/dist/lib/helpers/StylesheetApiHelper.js.map +1 -1
  104. package/dist/lib/helpers/StylesheetUiHelper.js +14 -9
  105. package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
  106. package/dist/lib/helpers/TelemetryDataUiHelper.js +3 -2
  107. package/dist/lib/helpers/TelemetryDataUiHelper.js.map +1 -1
  108. package/dist/lib/helpers/TemplateApiHelper.d.ts +8 -15
  109. package/dist/lib/helpers/TemplateApiHelper.js +51 -83
  110. package/dist/lib/helpers/TemplateApiHelper.js.map +1 -1
  111. package/dist/lib/helpers/TemplateUiHelper.js +25 -19
  112. package/dist/lib/helpers/TemplateUiHelper.js.map +1 -1
  113. package/dist/lib/helpers/TreeApiHelper.d.ts +15 -0
  114. package/dist/lib/helpers/TreeApiHelper.js +116 -0
  115. package/dist/lib/helpers/TreeApiHelper.js.map +1 -0
  116. package/dist/lib/helpers/UiBaseLocators.d.ts +228 -230
  117. package/dist/lib/helpers/UiBaseLocators.js +871 -832
  118. package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
  119. package/dist/lib/helpers/UserGroupApiHelper.d.ts +3 -13
  120. package/dist/lib/helpers/UserGroupApiHelper.js +3 -69
  121. package/dist/lib/helpers/UserGroupApiHelper.js.map +1 -1
  122. package/dist/lib/helpers/UserGroupUiHelper.js +49 -32
  123. package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
  124. package/dist/lib/helpers/UserUiHelper.js +46 -43
  125. package/dist/lib/helpers/UserUiHelper.js.map +1 -1
  126. package/dist/lib/helpers/VariantBasedApiHelper.d.ts +23 -0
  127. package/dist/lib/helpers/VariantBasedApiHelper.js +81 -0
  128. package/dist/lib/helpers/VariantBasedApiHelper.js.map +1 -0
  129. package/dist/lib/helpers/WebhookApiHelper.d.ts +1 -0
  130. package/dist/lib/helpers/WebhookApiHelper.js +10 -11
  131. package/dist/lib/helpers/WebhookApiHelper.js.map +1 -1
  132. package/dist/lib/helpers/WebhookUiHelper.js +27 -11
  133. package/dist/lib/helpers/WebhookUiHelper.js.map +1 -1
  134. package/dist/lib/helpers/WelcomeDashboardUiHelper.js +1 -1
  135. package/dist/lib/helpers/WelcomeDashboardUiHelper.js.map +1 -1
  136. package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js +9 -4
  137. package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js.map +1 -1
  138. package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js +10 -5
  139. package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js.map +1 -1
  140. package/dist/lib/helpers/index.d.ts +4 -1
  141. package/dist/lib/helpers/index.js +9 -3
  142. package/dist/lib/helpers/index.js.map +1 -1
  143. package/dist/tsconfig.tsbuildinfo +1 -1
  144. package/package.json +1 -1
  145. package/dist/lib/helpers/BasePage.d.ts +0 -449
  146. package/dist/lib/helpers/BasePage.js +0 -547
  147. package/dist/lib/helpers/BasePage.js.map +0 -1
@@ -1,547 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BasePage = void 0;
4
- const test_1 = require("@playwright/test");
5
- /**
6
- * Base page class providing common UI interaction methods.
7
- * All methods follow best practices for reliability:
8
- * - click: Always checks element visibility before clicking
9
- * - enterText: Always clears before filling text
10
- * - select: Waits for element visibility before selecting
11
- *
12
- * @example
13
- * ```typescript
14
- * class MyPage extends BasePage {
15
- * readonly submitBtn: Locator;
16
- *
17
- * constructor(page: Page) {
18
- * super(page);
19
- * this.submitBtn = page.getByRole('button', {name: 'Submit'});
20
- * }
21
- *
22
- * async submit() {
23
- * await this.click(this.submitBtn);
24
- * }
25
- * }
26
- * ```
27
- */
28
- class BasePage {
29
- page;
30
- constructor(page) {
31
- this.page = page;
32
- }
33
- /**
34
- * Clicks an element after verifying it is visible.
35
- * @param locator - The element to click
36
- * @param options - Optional click configuration
37
- */
38
- async click(locator, options) {
39
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 7000 });
40
- await locator.click({ force: options?.force });
41
- }
42
- /**
43
- * Double-clicks an element after verifying it is visible.
44
- * @param locator - The element to double-click
45
- * @param options - Optional configuration
46
- */
47
- async doubleClick(locator, options) {
48
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
49
- await locator.dblclick({ force: options?.force });
50
- }
51
- /**
52
- * Right-clicks an element after verifying it is visible.
53
- * @param locator - The element to right-click
54
- * @param options - Optional configuration
55
- */
56
- async rightClick(locator, options) {
57
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
58
- await locator.click({ button: 'right', force: options?.force });
59
- }
60
- /**
61
- * Clicks an element using JavaScript (bypasses actionability checks).
62
- * Use when standard click doesn't work due to overlapping elements.
63
- * @param locator - The element to click
64
- */
65
- async javascriptClick(locator) {
66
- await locator.evaluate((el) => el.click());
67
- }
68
- /**
69
- * Enters text into an input field after clearing it.
70
- * Verifies element visibility before interaction.
71
- * @param locator - The input element
72
- * @param text - The text to enter
73
- * @param options - Optional configuration
74
- */
75
- async enterText(locator, text, options) {
76
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
77
- if (options?.clearFirst !== false) {
78
- await locator.clear();
79
- }
80
- await locator.fill(text);
81
- if (options?.verify) {
82
- await (0, test_1.expect)(locator).toHaveValue(text);
83
- }
84
- }
85
- /**
86
- * Types text character by character (simulates real typing).
87
- * Useful when fill() doesn't trigger necessary events.
88
- * @param locator - The input element
89
- * @param text - The text to type
90
- * @param options - Optional configuration
91
- */
92
- async typeText(locator, text, options) {
93
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
94
- if (options?.clearFirst !== false) {
95
- await locator.clear();
96
- }
97
- await locator.pressSequentially(text, { delay: options?.delay ?? 50 });
98
- if (options?.verify) {
99
- await (0, test_1.expect)(locator).toHaveValue(text);
100
- }
101
- }
102
- /**
103
- * Clears an input field.
104
- * @param locator - The input element to clear
105
- * @param options - Optional configuration
106
- */
107
- async clearText(locator, options) {
108
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
109
- await locator.clear();
110
- }
111
- /**
112
- * Presses a keyboard key while focused on an element.
113
- * @param locator - The element to focus
114
- * @param key - The key to press (e.g., 'Enter', 'Tab', 'Escape')
115
- */
116
- async pressKey(locator, key, options) {
117
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
118
- await locator.press(key);
119
- }
120
- /**
121
- * Selects an option from a dropdown by value.
122
- * @param locator - The select element
123
- * @param value - The option value to select
124
- */
125
- async selectByValue(locator, value, options) {
126
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
127
- await locator.selectOption({ value });
128
- }
129
- /**
130
- * Selects an option from a dropdown by visible text.
131
- * @param locator - The select element
132
- * @param text - The option text to select
133
- */
134
- async selectByText(locator, text, options) {
135
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
136
- await locator.selectOption({ label: text });
137
- }
138
- /**
139
- * Selects an option from a dropdown by index.
140
- * @param locator - The select element
141
- * @param index - The option index to select (0-based)
142
- */
143
- async selectByIndex(locator, index, options) {
144
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
145
- await locator.selectOption({ index });
146
- }
147
- /**
148
- * Selects multiple options from a multi-select dropdown.
149
- * @param locator - The select element
150
- * @param values - Array of option values to select
151
- */
152
- async selectMultiple(locator, values, options) {
153
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
154
- await locator.selectOption(values);
155
- }
156
- /**
157
- * Checks a checkbox if it's not already checked.
158
- * @param locator - The checkbox element
159
- */
160
- async check(locator, options) {
161
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
162
- await locator.check({ force: options?.force });
163
- }
164
- /**
165
- * Unchecks a checkbox if it's currently checked.
166
- * @param locator - The checkbox element
167
- */
168
- async uncheck(locator, options) {
169
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
170
- await locator.uncheck({ force: options?.force });
171
- }
172
- /**
173
- * Sets a checkbox to a specific state.
174
- * @param locator - The checkbox element
175
- * @param checked - Whether the checkbox should be checked
176
- */
177
- async setChecked(locator, checked, options) {
178
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
179
- await locator.setChecked(checked, { force: options?.force });
180
- }
181
- /**
182
- * Hovers over an element.
183
- * @param locator - The element to hover over
184
- */
185
- async hover(locator, options) {
186
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
187
- await locator.hover({ force: options?.force });
188
- }
189
- /**
190
- * Focuses on an element.
191
- * @param locator - The element to focus
192
- */
193
- async focus(locator, options) {
194
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
195
- await locator.focus();
196
- }
197
- /**
198
- * Hovers over one element and clicks another (for menus that appear on hover).
199
- * @param hoverLocator - The element to hover over
200
- * @param clickLocator - The element to click after hover
201
- */
202
- async hoverAndClick(hoverLocator, clickLocator, options) {
203
- await (0, test_1.expect)(hoverLocator).toBeVisible({ timeout: options?.timeout ?? 5000 });
204
- await hoverLocator.hover();
205
- await (0, test_1.expect)(clickLocator).toBeVisible({ timeout: options?.timeout ?? 5000 });
206
- await clickLocator.click({ force: options?.force });
207
- }
208
- /**
209
- * Waits for an element to be visible.
210
- * @param locator - The element to wait for
211
- * @param timeout - Maximum time to wait in milliseconds
212
- */
213
- async waitForVisible(locator, timeout) {
214
- await (0, test_1.expect)(locator).toBeVisible({ timeout: timeout ?? 5000 });
215
- }
216
- /**
217
- * Waits for an element to be hidden.
218
- * @param locator - The element to wait for
219
- * @param timeout - Maximum time to wait in milliseconds
220
- */
221
- async waitForHidden(locator, timeout) {
222
- await (0, test_1.expect)(locator).toBeHidden({ timeout: timeout ?? 5000 });
223
- }
224
- /**
225
- * Waits for an element to be attached to the DOM.
226
- * @param locator - The element to wait for
227
- * @param timeout - Maximum time to wait in milliseconds
228
- */
229
- async waitForAttached(locator, timeout) {
230
- await locator.waitFor({ state: 'attached', timeout: timeout ?? 5000 });
231
- }
232
- /**
233
- * Waits for an element to be detached from the DOM.
234
- * @param locator - The element to wait for
235
- * @param timeout - Maximum time to wait in milliseconds
236
- */
237
- async waitForDetached(locator, timeout) {
238
- await locator.waitFor({ state: 'detached', timeout: timeout ?? 5000 });
239
- }
240
- /**
241
- * Waits for the page to finish loading (network idle).
242
- */
243
- async waitForPageLoad() {
244
- await this.page.waitForLoadState('networkidle');
245
- }
246
- /**
247
- * Waits for the DOM to be fully loaded.
248
- */
249
- async waitForDOMContentLoaded() {
250
- await this.page.waitForLoadState('domcontentloaded');
251
- }
252
- /**
253
- * Waits for all network requests to complete.
254
- */
255
- async waitForLoadState() {
256
- await this.page.waitForLoadState();
257
- }
258
- /**
259
- * Waits for an element to be enabled.
260
- * @param locator - The element to wait for
261
- * @param timeout - Maximum time to wait in milliseconds
262
- */
263
- async waitForEnabled(locator, timeout) {
264
- await (0, test_1.expect)(locator).toBeEnabled({ timeout: timeout ?? 5000 });
265
- }
266
- /**
267
- * Waits for an element to be disabled.
268
- * @param locator - The element to wait for
269
- * @param timeout - Maximum time to wait in milliseconds
270
- */
271
- async waitForDisabled(locator, timeout) {
272
- await (0, test_1.expect)(locator).toBeDisabled({ timeout: timeout ?? 5000 });
273
- }
274
- /**
275
- * Waits for an element to contain specific text.
276
- * @param locator - The element to wait for
277
- * @param text - The text to wait for
278
- * @param timeout - Maximum time to wait in milliseconds
279
- */
280
- async waitForText(locator, text, timeout) {
281
- await (0, test_1.expect)(locator).toContainText(text, { timeout: timeout ?? 5000 });
282
- }
283
- /**
284
- * Waits for an input to have a specific value.
285
- * @param locator - The input element to wait for
286
- * @param value - The value to wait for
287
- * @param timeout - Maximum time to wait in milliseconds
288
- */
289
- async waitForValue(locator, value, timeout) {
290
- await (0, test_1.expect)(locator).toHaveValue(value, { timeout: timeout ?? 5000 });
291
- }
292
- /**
293
- * Waits for an element to have a specific attribute value.
294
- * @param locator - The element to wait for
295
- * @param name - The attribute name
296
- * @param value - The expected attribute value
297
- * @param timeout - Maximum time to wait in milliseconds
298
- */
299
- async waitForAttribute(locator, name, value, timeout) {
300
- await (0, test_1.expect)(locator).toHaveAttribute(name, value, { timeout: timeout ?? 5000 });
301
- }
302
- /**
303
- * Waits for an element to have a specific CSS class.
304
- * @param locator - The element to wait for
305
- * @param className - The CSS class to wait for
306
- * @param timeout - Maximum time to wait in milliseconds
307
- */
308
- async waitForClass(locator, className, timeout) {
309
- await (0, test_1.expect)(locator).toHaveClass(className, { timeout: timeout ?? 5000 });
310
- }
311
- /**
312
- * Waits for an element to be editable.
313
- * @param locator - The element to wait for
314
- * @param timeout - Maximum time to wait in milliseconds
315
- */
316
- async waitForEditable(locator, timeout) {
317
- await (0, test_1.expect)(locator).toBeEditable({ timeout: timeout ?? 5000 });
318
- }
319
- /**
320
- * Waits for an element to be checked.
321
- * @param locator - The checkbox/radio element to wait for
322
- * @param timeout - Maximum time to wait in milliseconds
323
- */
324
- async waitForChecked(locator, timeout) {
325
- await (0, test_1.expect)(locator).toBeChecked({ timeout: timeout ?? 5000 });
326
- }
327
- /**
328
- * Waits for an element to be unchecked.
329
- * @param locator - The checkbox/radio element to wait for
330
- * @param timeout - Maximum time to wait in milliseconds
331
- */
332
- async waitForUnchecked(locator, timeout) {
333
- await (0, test_1.expect)(locator).not.toBeChecked({ timeout: timeout ?? 5000 });
334
- }
335
- /**
336
- * Waits for a specific URL or URL pattern.
337
- * @param url - The URL string or regex pattern to wait for
338
- * @param timeout - Maximum time to wait in milliseconds
339
- */
340
- async waitForURL(url, timeout) {
341
- await this.page.waitForURL(url, { timeout: timeout ?? 30000 });
342
- }
343
- /**
344
- * Waits for a navigation to complete.
345
- * @param timeout - Maximum time to wait in milliseconds
346
- */
347
- async waitForNavigation(timeout) {
348
- await this.page.waitForLoadState('load', { timeout: timeout ?? 30000 });
349
- }
350
- /**
351
- * Waits for a specific time (use sparingly, prefer explicit waits).
352
- * @param milliseconds - Time to wait in milliseconds
353
- */
354
- async waitForTimeout(milliseconds) {
355
- await this.page.waitForTimeout(milliseconds);
356
- }
357
- /**
358
- * Waits for a network request to a specific URL.
359
- * @param urlOrPredicate - URL string, regex, or predicate function
360
- * @param timeout - Maximum time to wait in milliseconds
361
- */
362
- async waitForRequest(urlOrPredicate, timeout) {
363
- return await this.page.waitForRequest(urlOrPredicate, { timeout: timeout ?? 30000 });
364
- }
365
- /**
366
- * Waits for a network response from a specific URL.
367
- * @param urlOrPredicate - URL string, regex, or predicate function
368
- * @param timeout - Maximum time to wait in milliseconds
369
- */
370
- async waitForResponse(urlOrPredicate, timeout) {
371
- return await this.page.waitForResponse(urlOrPredicate, { timeout: timeout ?? 30000 });
372
- }
373
- /**
374
- * Waits for an element to be focused.
375
- * @param locator - The element to wait for
376
- * @param timeout - Maximum time to wait in milliseconds
377
- */
378
- async waitForFocused(locator, timeout) {
379
- await (0, test_1.expect)(locator).toBeFocused({ timeout: timeout ?? 5000 });
380
- }
381
- /**
382
- * Waits for an element to be empty (no text content).
383
- * @param locator - The element to wait for
384
- * @param timeout - Maximum time to wait in milliseconds
385
- */
386
- async waitForEmpty(locator, timeout) {
387
- await (0, test_1.expect)(locator).toBeEmpty({ timeout: timeout ?? 5000 });
388
- }
389
- /**
390
- * Waits for a function to return true.
391
- * @param predicate - Function that returns a boolean or Promise<boolean>
392
- * @param timeout - Maximum time to wait in milliseconds
393
- */
394
- async waitForFunction(predicate, timeout) {
395
- await this.page.waitForFunction(predicate, { timeout: timeout ?? 30000 });
396
- }
397
- /**
398
- * Waits for an element to have a specific CSS property value.
399
- * @param locator - The element to wait for
400
- * @param property - The CSS property name
401
- * @param value - The expected CSS property value
402
- * @param timeout - Maximum time to wait in milliseconds
403
- */
404
- async waitForCSS(locator, property, value, timeout) {
405
- await (0, test_1.expect)(locator).toHaveCSS(property, value, { timeout: timeout ?? 5000 });
406
- }
407
- /**
408
- * Asserts that an element is visible.
409
- * @param locator - The element to check
410
- * @param isVisible - Whether the element should be visible (default: true)
411
- */
412
- async isVisible(locator, isVisible = true, timeout) {
413
- await (0, test_1.expect)(locator).toBeVisible({ visible: isVisible, timeout: timeout ?? 5000 });
414
- }
415
- /**
416
- * Asserts that an element is enabled.
417
- * @param locator - The element to check
418
- */
419
- async isEnabled(locator, timeout) {
420
- await (0, test_1.expect)(locator).toBeEnabled({ timeout: timeout ?? 5000 });
421
- }
422
- /**
423
- * Asserts that an element is disabled.
424
- * @param locator - The element to check
425
- */
426
- async isDisabled(locator, timeout) {
427
- await (0, test_1.expect)(locator).toBeDisabled({ timeout: timeout ?? 5000 });
428
- }
429
- /**
430
- * Asserts that an element contains specific text.
431
- * @param locator - The element to check
432
- * @param text - The text to look for
433
- */
434
- async containsText(locator, text, timeout) {
435
- await (0, test_1.expect)(locator).toContainText(text, { timeout: timeout ?? 5000 });
436
- }
437
- /**
438
- * Asserts that an element has specific text.
439
- * @param locator - The element to check
440
- * @param text - The exact text expected
441
- */
442
- async hasText(locator, text, timeout) {
443
- await (0, test_1.expect)(locator).toHaveText(text, { timeout: timeout ?? 5000 });
444
- }
445
- /**
446
- * Asserts that an input has a specific value.
447
- * @param locator - The input element to check
448
- * @param value - The expected value
449
- */
450
- async hasValue(locator, value, timeout) {
451
- await (0, test_1.expect)(locator).toHaveValue(value, { timeout: timeout ?? 5000 });
452
- }
453
- /**
454
- * Asserts that an element has a specific attribute value.
455
- * @param locator - The element to check
456
- * @param name - The attribute name
457
- * @param value - The expected attribute value
458
- */
459
- async hasAttribute(locator, name, value, timeout) {
460
- await (0, test_1.expect)(locator).toHaveAttribute(name, value, { timeout: timeout ?? 5000 });
461
- }
462
- /**
463
- * Asserts that a specific number of elements exist.
464
- * @param locator - The locator to count
465
- * @param count - The expected count
466
- */
467
- async hasCount(locator, count, timeout) {
468
- await (0, test_1.expect)(locator).toHaveCount(count, { timeout: timeout ?? 5000 });
469
- }
470
- /**
471
- * Gets the text content of an element.
472
- * @param locator - The element to get text from
473
- * @returns The text content
474
- */
475
- async getText(locator, options) {
476
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
477
- return await locator.textContent() ?? '';
478
- }
479
- /**
480
- * Gets the value of an input element.
481
- * @param locator - The input element
482
- * @returns The input value
483
- */
484
- async getValue(locator, options) {
485
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
486
- return await locator.inputValue();
487
- }
488
- /**
489
- * Gets an attribute value from an element.
490
- * @param locator - The element
491
- * @param attributeName - The attribute name
492
- * @returns The attribute value or null
493
- */
494
- async getAttribute(locator, attributeName, options) {
495
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
496
- return await locator.getAttribute(attributeName);
497
- }
498
- /**
499
- * Checks if an element is currently visible.
500
- * @param locator - The element to check
501
- * @returns True if visible, false otherwise
502
- */
503
- async checkIsVisible(locator) {
504
- return await locator.isVisible();
505
- }
506
- /**
507
- * Checks if a checkbox is checked.
508
- * @param locator - The checkbox element
509
- * @returns True if checked, false otherwise
510
- */
511
- async isChecked(locator) {
512
- return await locator.isChecked();
513
- }
514
- /**
515
- * Scrolls an element into view.
516
- * @param locator - The element to scroll to
517
- */
518
- async scrollIntoView(locator, options) {
519
- await (0, test_1.expect)(locator).toBeVisible({ timeout: options?.timeout ?? 5000 });
520
- await locator.scrollIntoViewIfNeeded();
521
- }
522
- /**
523
- * Sets files on a file input element.
524
- * @param locator - The file input element
525
- * @param filePath - Path to the file(s) to set
526
- */
527
- async setInputFiles(locator, filePath) {
528
- await locator.setInputFiles(filePath);
529
- }
530
- /**
531
- * Clears files from a file input.
532
- * @param locator - The file input element
533
- */
534
- async clearInputFiles(locator) {
535
- await locator.setInputFiles([]);
536
- }
537
- /**
538
- * Drags an element and drops it on another element.
539
- * @param source - The element to drag
540
- * @param target - The element to drop on
541
- */
542
- async dragTo(source, target, options) {
543
- await source.dragTo(target, options);
544
- }
545
- }
546
- exports.BasePage = BasePage;
547
- //# sourceMappingURL=BasePage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BasePage.js","sourceRoot":"","sources":["../../../lib/helpers/BasePage.ts"],"names":[],"mappings":";;;AAAA,2CAAuD;AAEvD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,QAAQ;IACV,IAAI,CAAO;IAEpB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,KAAK,CAAC,OAAgB,EAAE,OAA6C;QACzE,MAAM,IAAA,aAAM,EAAC,OAAO,CAAC,CAAC,WAAW,CAAC,EAAC,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAC,CAAC,CAAC;QACvE,MAAM,OAAO,CAAC,KAAK,CAA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right/test\";\n\n/**\n * Base page class providing common UI interaction methods.\n * All methods follow best practices for reliability:\n * - click: Always checks element visibility before clicking\n * - enterText: Always clears before filling text\n * - select: Waits for element visibility before selecting\n *\n * @example\n * ```typescript\n * class MyPage extends BasePage {\n * readonly submitBtn: Locator;\n *\n * constructor(page: Page) {\n * super(page);\n * this.submitBtn = page.getByRole('button', {name: 'Submit'});\n * }\n *\n * async submit() {\n * await this.click(this.submitBtn);\n * }\n * }\n * ```\n */\nexport class BasePage {\n readonly page: Page;\n\n constructor(page: Page) {\n this.page = page;\n }\n\n /**\n * Clicks an element after verifying it is visible.\n * @param locator - The element to click\n * @param options - Optional click configuration\n */\n async click(locator: Locator, options?: {force?: boolean; timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 7000});\n await locator.click({force: options?.force});\n }\n\n /**\n * Double-clicks an element after verifying it is visible.\n * @param locator - The element to double-click\n * @param options - Optional configuration\n */\n async doubleClick(locator: Locator, options?: {force?: boolean; timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.dblclick({force: options?.force});\n }\n\n /**\n * Right-clicks an element after verifying it is visible.\n * @param locator - The element to right-click\n * @param options - Optional configuration\n */\n async rightClick(locator: Locator, options?: {force?: boolean; timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.click({button: 'right', force: options?.force});\n }\n\n /**\n * Clicks an element using JavaScript (bypasses actionability checks).\n * Use when standard click doesn't work due to overlapping elements.\n * @param locator - The element to click\n */\n async javascriptClick(locator: Locator): Promise<void> {\n await locator.evaluate((el: HTMLElement) => el.click());\n }\n\n /**\n * Enters text into an input field after clearing it.\n * Verifies element visibility before interaction.\n * @param locator - The input element\n * @param text - The text to enter\n * @param options - Optional configuration\n */\n async enterText(\n locator: Locator,\n text: string,\n options?: {clearFirst?: boolean; verify?: boolean; timeout?: number}\n ): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n if (options?.clearFirst !== false) {\n await locator.clear();\n }\n await locator.fill(text);\n if (options?.verify) {\n await expect(locator).toHaveValue(text);\n }\n }\n\n /**\n * Types text character by character (simulates real typing).\n * Useful when fill() doesn't trigger necessary events.\n * @param locator - The input element\n * @param text - The text to type\n * @param options - Optional configuration\n */\n async typeText(\n locator: Locator,\n text: string,\n options?: {clearFirst?: boolean; verify?: boolean; delay?: number; timeout?: number}\n ): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n if (options?.clearFirst !== false) {\n await locator.clear();\n }\n await locator.pressSequentially(text, {delay: options?.delay ?? 50});\n if (options?.verify) {\n await expect(locator).toHaveValue(text);\n }\n }\n\n /**\n * Clears an input field.\n * @param locator - The input element to clear\n * @param options - Optional configuration\n */\n async clearText(locator: Locator, options?: {timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.clear();\n }\n\n /**\n * Presses a keyboard key while focused on an element.\n * @param locator - The element to focus\n * @param key - The key to press (e.g., 'Enter', 'Tab', 'Escape')\n */\n async pressKey(locator: Locator, key: string, options?: {timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.press(key);\n }\n\n /**\n * Selects an option from a dropdown by value.\n * @param locator - The select element\n * @param value - The option value to select\n */\n async selectByValue(locator: Locator, value: string, options?: {timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.selectOption({value});\n }\n\n /**\n * Selects an option from a dropdown by visible text.\n * @param locator - The select element\n * @param text - The option text to select\n */\n async selectByText(locator: Locator, text: string, options?: {timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.selectOption({label: text});\n }\n\n /**\n * Selects an option from a dropdown by index.\n * @param locator - The select element\n * @param index - The option index to select (0-based)\n */\n async selectByIndex(locator: Locator, index: number, options?: {timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.selectOption({index});\n }\n\n /**\n * Selects multiple options from a multi-select dropdown.\n * @param locator - The select element\n * @param values - Array of option values to select\n */\n async selectMultiple(locator: Locator, values: string[], options?: {timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.selectOption(values);\n }\n\n /**\n * Checks a checkbox if it's not already checked.\n * @param locator - The checkbox element\n */\n async check(locator: Locator, options?: {force?: boolean; timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.check({force: options?.force});\n }\n\n /**\n * Unchecks a checkbox if it's currently checked.\n * @param locator - The checkbox element\n */\n async uncheck(locator: Locator, options?: {force?: boolean; timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.uncheck({force: options?.force});\n }\n\n /**\n * Sets a checkbox to a specific state.\n * @param locator - The checkbox element\n * @param checked - Whether the checkbox should be checked\n */\n async setChecked(locator: Locator, checked: boolean, options?: {force?: boolean; timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.setChecked(checked, {force: options?.force});\n }\n\n /**\n * Hovers over an element.\n * @param locator - The element to hover over\n */\n async hover(locator: Locator, options?: {force?: boolean; timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.hover({force: options?.force});\n }\n\n /**\n * Focuses on an element.\n * @param locator - The element to focus\n */\n async focus(locator: Locator, options?: {timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.focus();\n }\n\n /**\n * Hovers over one element and clicks another (for menus that appear on hover).\n * @param hoverLocator - The element to hover over\n * @param clickLocator - The element to click after hover\n */\n async hoverAndClick(\n hoverLocator: Locator,\n clickLocator: Locator,\n options?: {force?: boolean; timeout?: number}\n ): Promise<void> {\n await expect(hoverLocator).toBeVisible({timeout: options?.timeout ?? 5000});\n await hoverLocator.hover();\n await expect(clickLocator).toBeVisible({timeout: options?.timeout ?? 5000});\n await clickLocator.click({force: options?.force});\n }\n\n /**\n * Waits for an element to be visible.\n * @param locator - The element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForVisible(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeVisible({timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to be hidden.\n * @param locator - The element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForHidden(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeHidden({timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to be attached to the DOM.\n * @param locator - The element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForAttached(locator: Locator, timeout?: number): Promise<void> {\n await locator.waitFor({state: 'attached', timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to be detached from the DOM.\n * @param locator - The element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForDetached(locator: Locator, timeout?: number): Promise<void> {\n await locator.waitFor({state: 'detached', timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for the page to finish loading (network idle).\n */\n async waitForPageLoad(): Promise<void> {\n await this.page.waitForLoadState('networkidle');\n }\n\n /**\n * Waits for the DOM to be fully loaded.\n */\n async waitForDOMContentLoaded(): Promise<void> {\n await this.page.waitForLoadState('domcontentloaded');\n }\n\n /**\n * Waits for all network requests to complete.\n */\n async waitForLoadState(): Promise<void> {\n await this.page.waitForLoadState();\n }\n\n /**\n * Waits for an element to be enabled.\n * @param locator - The element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForEnabled(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeEnabled({timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to be disabled.\n * @param locator - The element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForDisabled(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeDisabled({timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to contain specific text.\n * @param locator - The element to wait for\n * @param text - The text to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForText(locator: Locator, text: string, timeout?: number): Promise<void> {\n await expect(locator).toContainText(text, {timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an input to have a specific value.\n * @param locator - The input element to wait for\n * @param value - The value to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForValue(locator: Locator, value: string, timeout?: number): Promise<void> {\n await expect(locator).toHaveValue(value, {timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to have a specific attribute value.\n * @param locator - The element to wait for\n * @param name - The attribute name\n * @param value - The expected attribute value\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForAttribute(locator: Locator, name: string, value: string | RegExp, timeout?: number): Promise<void> {\n await expect(locator).toHaveAttribute(name, value, {timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to have a specific CSS class.\n * @param locator - The element to wait for\n * @param className - The CSS class to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForClass(locator: Locator, className: string | RegExp, timeout?: number): Promise<void> {\n await expect(locator).toHaveClass(className, {timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to be editable.\n * @param locator - The element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForEditable(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeEditable({timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to be checked.\n * @param locator - The checkbox/radio element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForChecked(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeChecked({timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to be unchecked.\n * @param locator - The checkbox/radio element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForUnchecked(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).not.toBeChecked({timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for a specific URL or URL pattern.\n * @param url - The URL string or regex pattern to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForURL(url: string | RegExp, timeout?: number): Promise<void> {\n await this.page.waitForURL(url, {timeout: timeout ?? 30000});\n }\n\n /**\n * Waits for a navigation to complete.\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForNavigation(timeout?: number): Promise<void> {\n await this.page.waitForLoadState('load', {timeout: timeout ?? 30000});\n }\n\n /**\n * Waits for a specific time (use sparingly, prefer explicit waits).\n * @param milliseconds - Time to wait in milliseconds\n */\n async waitForTimeout(milliseconds: number): Promise<void> {\n await this.page.waitForTimeout(milliseconds);\n }\n\n /**\n * Waits for a network request to a specific URL.\n * @param urlOrPredicate - URL string, regex, or predicate function\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForRequest(urlOrPredicate: string | RegExp | ((request: any) => boolean), timeout?: number): Promise<any> {\n return await this.page.waitForRequest(urlOrPredicate, {timeout: timeout ?? 30000});\n }\n\n /**\n * Waits for a network response from a specific URL.\n * @param urlOrPredicate - URL string, regex, or predicate function\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForResponse(urlOrPredicate: string | RegExp | ((response: any) => boolean), timeout?: number): Promise<any> {\n return await this.page.waitForResponse(urlOrPredicate, {timeout: timeout ?? 30000});\n }\n\n /**\n * Waits for an element to be focused.\n * @param locator - The element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForFocused(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeFocused({timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for an element to be empty (no text content).\n * @param locator - The element to wait for\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForEmpty(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeEmpty({timeout: timeout ?? 5000});\n }\n\n /**\n * Waits for a function to return true.\n * @param predicate - Function that returns a boolean or Promise<boolean>\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForFunction(predicate: () => boolean | Promise<boolean>, timeout?: number): Promise<void> {\n await this.page.waitForFunction(predicate, {timeout: timeout ?? 30000});\n }\n\n /**\n * Waits for an element to have a specific CSS property value.\n * @param locator - The element to wait for\n * @param property - The CSS property name\n * @param value - The expected CSS property value\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForCSS(locator: Locator, property: string, value: string | RegExp, timeout?: number): Promise<void> {\n await expect(locator).toHaveCSS(property, value, {timeout: timeout ?? 5000});\n }\n\n /**\n * Asserts that an element is visible.\n * @param locator - The element to check\n * @param isVisible - Whether the element should be visible (default: true)\n */\n async isVisible(locator: Locator, isVisible: boolean = true, timeout?: number): Promise<void> {\n await expect(locator).toBeVisible({visible: isVisible, timeout: timeout ?? 5000});\n }\n\n /**\n * Asserts that an element is enabled.\n * @param locator - The element to check\n */\n async isEnabled(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeEnabled({timeout: timeout ?? 5000});\n }\n\n /**\n * Asserts that an element is disabled.\n * @param locator - The element to check\n */\n async isDisabled(locator: Locator, timeout?: number): Promise<void> {\n await expect(locator).toBeDisabled({timeout: timeout ?? 5000});\n }\n\n /**\n * Asserts that an element contains specific text.\n * @param locator - The element to check\n * @param text - The text to look for\n */\n async containsText(locator: Locator, text: string, timeout?: number): Promise<void> {\n await expect(locator).toContainText(text, {timeout: timeout ?? 5000});\n }\n\n /**\n * Asserts that an element has specific text.\n * @param locator - The element to check\n * @param text - The exact text expected\n */\n async hasText(locator: Locator, text: string, timeout?: number): Promise<void> {\n await expect(locator).toHaveText(text, {timeout: timeout ?? 5000});\n }\n\n /**\n * Asserts that an input has a specific value.\n * @param locator - The input element to check\n * @param value - The expected value\n */\n async hasValue(locator: Locator, value: string, timeout?: number): Promise<void> {\n await expect(locator).toHaveValue(value, {timeout: timeout ?? 5000});\n }\n\n /**\n * Asserts that an element has a specific attribute value.\n * @param locator - The element to check\n * @param name - The attribute name\n * @param value - The expected attribute value\n */\n async hasAttribute(locator: Locator, name: string, value: string, timeout?: number): Promise<void> {\n await expect(locator).toHaveAttribute(name, value, {timeout: timeout ?? 5000});\n }\n\n /**\n * Asserts that a specific number of elements exist.\n * @param locator - The locator to count\n * @param count - The expected count\n */\n async hasCount(locator: Locator, count: number, timeout?: number): Promise<void> {\n await expect(locator).toHaveCount(count, {timeout: timeout ?? 5000});\n }\n\n /**\n * Gets the text content of an element.\n * @param locator - The element to get text from\n * @returns The text content\n */\n async getText(locator: Locator, options?: {timeout?: number}): Promise<string> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n return await locator.textContent() ?? '';\n }\n\n /**\n * Gets the value of an input element.\n * @param locator - The input element\n * @returns The input value\n */\n async getValue(locator: Locator, options?: {timeout?: number}): Promise<string> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n return await locator.inputValue();\n }\n\n /**\n * Gets an attribute value from an element.\n * @param locator - The element\n * @param attributeName - The attribute name\n * @returns The attribute value or null\n */\n async getAttribute(locator: Locator, attributeName: string, options?: {timeout?: number}): Promise<string | null> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n return await locator.getAttribute(attributeName);\n }\n\n /**\n * Checks if an element is currently visible.\n * @param locator - The element to check\n * @returns True if visible, false otherwise\n */\n async checkIsVisible(locator: Locator): Promise<boolean> {\n return await locator.isVisible();\n }\n\n /**\n * Checks if a checkbox is checked.\n * @param locator - The checkbox element\n * @returns True if checked, false otherwise\n */\n async isChecked(locator: Locator): Promise<boolean> {\n return await locator.isChecked();\n }\n\n /**\n * Scrolls an element into view.\n * @param locator - The element to scroll to\n */\n async scrollIntoView(locator: Locator, options?: {timeout?: number}): Promise<void> {\n await expect(locator).toBeVisible({timeout: options?.timeout ?? 5000});\n await locator.scrollIntoViewIfNeeded();\n }\n\n /**\n * Sets files on a file input element.\n * @param locator - The file input element\n * @param filePath - Path to the file(s) to set\n */\n async setInputFiles(locator: Locator, filePath: string | string[]): Promise<void> {\n await locator.setInputFiles(filePath);\n }\n\n /**\n * Clears files from a file input.\n * @param locator - The file input element\n */\n async clearInputFiles(locator: Locator): Promise<void> {\n await locator.setInputFiles([]);\n }\n\n /**\n * Drags an element and drops it on another element.\n * @param source - The element to drag\n * @param target - The element to drop on\n */\n async dragTo(\n source: Locator,\n target: Locator,\n options?: {sourcePosition?: {x: number; y: number}; targetPosition?: {x: number; y: number}}\n ): Promise<void> {\n await source.dragTo(target, options);\n }\n\n}\n"]}