playwright-cucumber-ts-steps 1.0.1 → 1.0.2

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 (132) hide show
  1. package/README.md +195 -256
  2. package/dist/backend/actions/index.js +4 -0
  3. package/dist/backend/actions/interactions.js +23 -0
  4. package/dist/backend/actions/navigation.js +19 -0
  5. package/dist/backend/api/assertions.js +26 -0
  6. package/dist/backend/api/index.js +4 -0
  7. package/dist/backend/api/requests.js +24 -0
  8. package/dist/backend/api/state.js +15 -0
  9. package/dist/backend/assertions/expectVisible.js +8 -0
  10. package/dist/backend/assertions/index.js +5 -0
  11. package/dist/backend/assertions/pageState.js +25 -0
  12. package/dist/backend/assertions/text.js +20 -0
  13. package/dist/backend/assertions/visibility.js +20 -0
  14. package/dist/backend/auth/index.js +71 -0
  15. package/dist/backend/elements/alerts.js +21 -0
  16. package/dist/backend/elements/forms.js +59 -0
  17. package/dist/backend/elements/frames.js +25 -0
  18. package/dist/backend/elements/index.js +5 -0
  19. package/dist/core/registry.js +20 -0
  20. package/dist/core/runner.js +136 -0
  21. package/dist/index.js +10 -0
  22. package/dist/reporting/index.js +43 -0
  23. package/package.json +19 -101
  24. package/LICENSE +0 -21
  25. package/lib/actions/clickSteps.d.ts +0 -251
  26. package/lib/actions/clickSteps.js +0 -415
  27. package/lib/actions/cookieSteps.d.ts +0 -18
  28. package/lib/actions/cookieSteps.js +0 -93
  29. package/lib/actions/debugSteps.d.ts +0 -14
  30. package/lib/actions/debugSteps.js +0 -23
  31. package/lib/actions/elementFindSteps.d.ts +0 -668
  32. package/lib/actions/elementFindSteps.js +0 -931
  33. package/lib/actions/fillFormSteps.d.ts +0 -69
  34. package/lib/actions/fillFormSteps.js +0 -237
  35. package/lib/actions/index.d.ts +0 -11
  36. package/lib/actions/index.js +0 -28
  37. package/lib/actions/inputSteps.d.ts +0 -218
  38. package/lib/actions/inputSteps.js +0 -343
  39. package/lib/actions/interceptionSteps.d.ts +0 -169
  40. package/lib/actions/interceptionSteps.js +0 -291
  41. package/lib/actions/miscSteps.d.ts +0 -645
  42. package/lib/actions/miscSteps.js +0 -1061
  43. package/lib/actions/mouseSteps.d.ts +0 -143
  44. package/lib/actions/mouseSteps.js +0 -234
  45. package/lib/actions/scrollSteps.d.ts +0 -82
  46. package/lib/actions/scrollSteps.js +0 -123
  47. package/lib/actions/storageSteps.d.ts +0 -174
  48. package/lib/actions/storageSteps.js +0 -292
  49. package/lib/assertions/buttonAndTextVisibilitySteps.d.ts +0 -245
  50. package/lib/assertions/buttonAndTextVisibilitySteps.js +0 -401
  51. package/lib/assertions/cookieSteps.d.ts +0 -75
  52. package/lib/assertions/cookieSteps.js +0 -113
  53. package/lib/assertions/elementSteps.d.ts +0 -264
  54. package/lib/assertions/elementSteps.js +0 -388
  55. package/lib/assertions/formInputSteps.d.ts +0 -248
  56. package/lib/assertions/formInputSteps.js +0 -350
  57. package/lib/assertions/index.d.ts +0 -10
  58. package/lib/assertions/index.js +0 -27
  59. package/lib/assertions/interceptionRequestsSteps.d.ts +0 -353
  60. package/lib/assertions/interceptionRequestsSteps.js +0 -593
  61. package/lib/assertions/locationSteps.d.ts +0 -217
  62. package/lib/assertions/locationSteps.js +0 -310
  63. package/lib/assertions/roleTestIdSteps.d.ts +0 -159
  64. package/lib/assertions/roleTestIdSteps.js +0 -221
  65. package/lib/assertions/semanticSteps.d.ts +0 -176
  66. package/lib/assertions/semanticSteps.js +0 -252
  67. package/lib/assertions/storageSteps.d.ts +0 -149
  68. package/lib/assertions/storageSteps.js +0 -210
  69. package/lib/assertions/visualSteps.d.ts +0 -74
  70. package/lib/assertions/visualSteps.js +0 -209
  71. package/lib/custom_setups/loginHooks.d.ts +0 -1
  72. package/lib/custom_setups/loginHooks.js +0 -130
  73. package/lib/helpers/checkPeerDeps.d.ts +0 -1
  74. package/lib/helpers/checkPeerDeps.js +0 -19
  75. package/lib/helpers/compareSnapshots.d.ts +0 -6
  76. package/lib/helpers/compareSnapshots.js +0 -20
  77. package/lib/helpers/hooks.d.ts +0 -1
  78. package/lib/helpers/hooks.js +0 -210
  79. package/lib/helpers/utils/fakerUtils.d.ts +0 -1
  80. package/lib/helpers/utils/fakerUtils.js +0 -60
  81. package/lib/helpers/utils/index.d.ts +0 -4
  82. package/lib/helpers/utils/index.js +0 -20
  83. package/lib/helpers/utils/optionsUtils.d.ts +0 -24
  84. package/lib/helpers/utils/optionsUtils.js +0 -88
  85. package/lib/helpers/utils/resolveUtils.d.ts +0 -6
  86. package/lib/helpers/utils/resolveUtils.js +0 -72
  87. package/lib/helpers/utils/sessionUtils.d.ts +0 -3
  88. package/lib/helpers/utils/sessionUtils.js +0 -40
  89. package/lib/helpers/world.d.ts +0 -34
  90. package/lib/helpers/world.js +0 -110
  91. package/lib/iframes/frames.d.ts +0 -1
  92. package/lib/iframes/frames.js +0 -11
  93. package/lib/index.d.ts +0 -10
  94. package/lib/index.js +0 -28
  95. package/lib/register.d.ts +0 -1
  96. package/lib/register.js +0 -6
  97. package/src/actions/clickSteps.ts +0 -429
  98. package/src/actions/cookieSteps.ts +0 -95
  99. package/src/actions/debugSteps.ts +0 -21
  100. package/src/actions/elementFindSteps.ts +0 -961
  101. package/src/actions/fillFormSteps.ts +0 -270
  102. package/src/actions/index.ts +0 -12
  103. package/src/actions/inputSteps.ts +0 -354
  104. package/src/actions/interceptionSteps.ts +0 -325
  105. package/src/actions/miscSteps.ts +0 -1144
  106. package/src/actions/mouseSteps.ts +0 -256
  107. package/src/actions/scrollSteps.ts +0 -122
  108. package/src/actions/storageSteps.ts +0 -308
  109. package/src/assertions/buttonAndTextVisibilitySteps.ts +0 -436
  110. package/src/assertions/cookieSteps.ts +0 -131
  111. package/src/assertions/elementSteps.ts +0 -432
  112. package/src/assertions/formInputSteps.ts +0 -377
  113. package/src/assertions/index.ts +0 -11
  114. package/src/assertions/interceptionRequestsSteps.ts +0 -640
  115. package/src/assertions/locationSteps.ts +0 -315
  116. package/src/assertions/roleTestIdSteps.ts +0 -254
  117. package/src/assertions/semanticSteps.ts +0 -267
  118. package/src/assertions/storageSteps.ts +0 -250
  119. package/src/assertions/visualSteps.ts +0 -275
  120. package/src/custom_setups/loginHooks.ts +0 -154
  121. package/src/helpers/checkPeerDeps.ts +0 -19
  122. package/src/helpers/compareSnapshots.ts +0 -35
  123. package/src/helpers/hooks.ts +0 -212
  124. package/src/helpers/utils/fakerUtils.ts +0 -64
  125. package/src/helpers/utils/index.ts +0 -4
  126. package/src/helpers/utils/optionsUtils.ts +0 -104
  127. package/src/helpers/utils/resolveUtils.ts +0 -74
  128. package/src/helpers/utils/sessionUtils.ts +0 -36
  129. package/src/helpers/world.ts +0 -119
  130. package/src/iframes/frames.ts +0 -15
  131. package/src/index.ts +0 -18
  132. package/src/register.ts +0 -4
@@ -1,668 +0,0 @@
1
- import { CustomWorld } from "../helpers/world";
2
- /**
3
- * Finds an element by CSS selector and stores it as the current element.
4
- *
5
- * ```gherkin
6
- * When I find element by selector {string}
7
- * ```
8
- *
9
- * @example
10
- * When I find element by selector ".my-class"
11
- *
12
- * @remarks
13
- * This step sets the {@link CustomWorld.element | current element} in the test context.
14
- * Subsequent steps can then interact with this single element. An `expect` assertion is included
15
- * to ensure exactly one element is found.
16
- */
17
- export declare function When_I_find_element_by_selector(this: CustomWorld, selector: string): Promise<void>;
18
- /**
19
- * Finds a link by its text and stores it as the current locator.
20
- *
21
- * ```gherkin
22
- * When I find link by text {string}
23
- * ```
24
- *
25
- * @example
26
- * When I find link by text "Home"
27
- *
28
- * @remarks
29
- * This step sets the {@link CustomWorld.currentLocator | currentLocator} in the test context,
30
- * allowing subsequent steps to operate on the found link. For example:
31
- *
32
- * ```gherkin
33
- * When I find link by text "Products"
34
- * And I click current element
35
- * ```
36
- */
37
- export declare function When_I_find_link_by_text(this: CustomWorld, text: string): Promise<void>;
38
- /**
39
- * Finds a heading by its text and stores it as the current locator.
40
- *
41
- * ```gherkin
42
- * When I find heading by text {string}
43
- * ```
44
- *
45
- * @example
46
- * When I find heading by text "Welcome"
47
- *
48
- * @remarks
49
- * This step sets the {@link CustomWorld.currentLocator | currentLocator} in the test context,
50
- * allowing subsequent steps to operate on the found heading.
51
- */
52
- export declare function When_I_find_heading_by_text(this: CustomWorld, text: string): Promise<void>;
53
- /**
54
- * Finds all headings by text and stores them as the current locator.
55
- *
56
- * ```gherkin
57
- * When I find headings by text {string}
58
- * ```
59
- *
60
- * @example
61
- * When I find headings by text "Section"
62
- *
63
- * @remarks
64
- * This step sets the {@link CustomWorld.currentLocator | currentLocator} in the test context
65
- * to a locator that matches *all* headings with the specified text. This is useful for
66
- * verifying multiple instances or iterating.
67
- */
68
- export declare function When_I_find_headings_by_text(this: CustomWorld, text: string): Promise<void>;
69
- /**
70
- * Finds all elements by CSS selector and stores them.
71
- *
72
- * ```gherkin
73
- * When I find elements by selector {string}
74
- * ```
75
- *
76
- * @example
77
- * When I find elements by selector ".item"
78
- *
79
- * @remarks
80
- * This step sets the {@link CustomWorld.elements | elements} property in the test context
81
- * to a Playwright `Locator` representing all matching elements. You can then use steps like
82
- * "When I get first element" to pick a specific one.
83
- */
84
- export declare function When_I_find_elements_by_selector(this: CustomWorld, selector: string): Promise<void>;
85
- /**
86
- * Finds an element by its exact text and stores it as the current element.
87
- *
88
- * ```gherkin
89
- * When I find element by text {string}
90
- * ```
91
- *
92
- * @example
93
- * When I find element by text "Submit"
94
- *
95
- * @remarks
96
- * This step uses `page.getByText` with `exact: true` to find an element
97
- * that matches the text precisely. It stores the result in {@link CustomWorld.element | this.element}.
98
- * An `expect` assertion is included to ensure exactly one element is found.
99
- */
100
- export declare function When_I_find_element_by_text(this: CustomWorld, text: string): Promise<void>;
101
- /**
102
- * Finds an element by its title attribute and stores it as the current element.
103
- *
104
- * ```gherkin
105
- * When I find element by title {string}
106
- * ```
107
- *
108
- * @example
109
- * When I find element by title "Tooltip"
110
- *
111
- * @remarks
112
- * This step uses `page.getByTitle` to find an element with the specified `title` attribute.
113
- * It stores the result in {@link CustomWorld.element | this.element}.
114
- * An `expect` assertion is included to ensure exactly one element is found.
115
- */
116
- export declare function When_I_find_element_by_title(this: CustomWorld, title: string): Promise<void>;
117
- /**
118
- * Finds an element by its test id and stores it as the current element.
119
- *
120
- * ```gherkin
121
- * When I find element by testid {string}
122
- * ```
123
- *
124
- * @example
125
- * When I find element by testid "main-content"
126
- *
127
- * @remarks
128
- * This step uses `page.getByTestId` to find an element based on its
129
- * `data-testid` attribute (or configured test ID attribute).
130
- * It stores the result in {@link CustomWorld.element | this.element}.
131
- * An `expect` assertion is included to ensure exactly one element is found.
132
- */
133
- export declare function When_I_find_element_by_testid(this: CustomWorld, testid: string): Promise<void>;
134
- /**
135
- * Finds an element by its role and stores it as the current element.
136
- *
137
- * ```gherkin
138
- * When I find element by role {string}
139
- * ```
140
- *
141
- * @example
142
- * When I find element by role "button"
143
- *
144
- * @remarks
145
- * This step uses `page.getByRole` to find an element based on its
146
- * ARIA role. It stores the result in {@link CustomWorld.element | this.element}.
147
- * An `expect` assertion is included to ensure exactly one element is found.
148
- */
149
- export declare function When_I_find_element_by_role(this: CustomWorld, role: string): Promise<void>;
150
- /**
151
- * Finds an element by its placeholder text and stores it as the current element.
152
- *
153
- * ```gherkin
154
- * When I find element by placeholder text {string}
155
- * ```
156
- *
157
- * @example
158
- * When I find element by placeholder text "Enter your name"
159
- *
160
- * @remarks
161
- * This step uses `page.getByPlaceholder` to find an input or textarea element
162
- * based on its `placeholder` attribute. It stores the result in {@link CustomWorld.element | this.element}.
163
- * An `expect` assertion is included to ensure exactly one element is found.
164
- */
165
- export declare function When_I_find_element_by_placeholder_text(this: CustomWorld, text: string): Promise<void>;
166
- /**
167
- * Finds an element by its label text and stores it as the current element.
168
- *
169
- * ```gherkin
170
- * When I find element by label text {string}
171
- * ```
172
- *
173
- * @example
174
- * When I find element by label text "Username"
175
- *
176
- * @remarks
177
- * This step uses `page.getByLabel` to find an element associated with a given
178
- * label text (e.g., using a `<label for="...">` or wrapping the input).
179
- * It stores the result in {@link CustomWorld.element | this.element}.
180
- * An `expect` assertion is included to ensure exactly one element is found.
181
- */
182
- export declare function When_I_find_element_by_label_text(this: CustomWorld, label: string): Promise<void>;
183
- /**
184
- * Finds all elements by label text and stores them as the current locator.
185
- *
186
- * ```gherkin
187
- * When I find elements by label text {string}
188
- * ```
189
- *
190
- * @example
191
- * When I find elements by label text "Username"
192
- *
193
- * @remarks
194
- * This step sets the {@link CustomWorld.currentLocator | currentLocator} to a locator
195
- * representing all elements associated with the given label text. This is useful
196
- * for scenarios where multiple inputs might share a similar label.
197
- */
198
- export declare function When_I_find_elements_by_label_text(this: CustomWorld, label: string): Promise<void>;
199
- /**
200
- * Finds an element by its alt text and stores it as the current element.
201
- *
202
- * ```gherkin
203
- * When I find element by alt text {string}
204
- * ```
205
- *
206
- * @example
207
- * When I find element by alt text "Logo"
208
- *
209
- * @remarks
210
- * This step uses `page.getByAltText` to find elements, typically images,
211
- * based on their `alt` attribute. It stores the result in {@link CustomWorld.element | this.element}.
212
- * An `expect` assertion is included to ensure exactly one element is found.
213
- */
214
- export declare function When_I_find_element_by_alt_text(this: CustomWorld, alt: string): Promise<void>;
215
- /**
216
- * Finds an input element by its name attribute and stores it as the current element.
217
- *
218
- * ```gherkin
219
- * When I find element by name {string}
220
- * ```
221
- *
222
- * @example
223
- * When I find element by name "email"
224
- *
225
- * @remarks
226
- * This step uses `page.getByRole("textbox", { name })` to specifically find an input
227
- * element (or similar interactive element) with the given `name` attribute.
228
- * It stores the result in {@link CustomWorld.element | this.element}.
229
- * An `expect` assertion is included to ensure exactly one element is found.
230
- */
231
- export declare function When_I_find_element_by_name(this: CustomWorld, name: string): Promise<void>;
232
- /**
233
- * Finds all elements by name attribute and stores them as the current locator.
234
- *
235
- * ```gherkin
236
- * When I find elements by name {string}
237
- * ```
238
- *
239
- * @example
240
- * When I find elements by name "email"
241
- *
242
- * @remarks
243
- * This step sets the {@link CustomWorld.currentLocator | currentLocator} to a CSS locator
244
- * targeting all elements with the specified `name` attribute.
245
- */
246
- export declare function When_I_find_elements_by_name(this: CustomWorld, name: string): Promise<void>;
247
- /**
248
- * Finds all buttons by text (supports alias) and stores them as elements.
249
- *
250
- * ```gherkin
251
- * When I find buttons by text {string}
252
- * ```
253
- *
254
- * @example
255
- * When I find buttons by text "Save"
256
- * When I find buttons by text "@buttonAlias"
257
- *
258
- * @remarks
259
- * This step uses `page.getByRole("button", { name })` to find all buttons
260
- * matching the provided text. It supports resolving an alias from `this.data`.
261
- * The result is stored in {@link CustomWorld.elements | this.elements}.
262
- */
263
- export declare function When_I_find_buttons_by_text(this: CustomWorld, buttonText: string): Promise<void>;
264
- /**
265
- * Gets the first element matching the selector and stores it as the current element.
266
- *
267
- * ```gherkin
268
- * When I get element by selector {string}
269
- * ```
270
- *
271
- * @example
272
- * When I get element by selector ".item"
273
- *
274
- * @remarks
275
- * This step targets a single element using a CSS selector and sets it as the
276
- * {@link CustomWorld.element | current element}. It's useful when you expect only
277
- * one element to match or you only need the first one.
278
- */
279
- export declare function When_I_get_element_by_selector(this: CustomWorld, selector: string): Promise<void>;
280
- /**
281
- * Gets all elements matching the selector and stores them.
282
- *
283
- * ```gherkin
284
- * When I get elements by selector {string}
285
- * ```
286
- *
287
- * @example
288
- * When I get elements by selector ".item"
289
- *
290
- * @remarks
291
- * This step sets the {@link CustomWorld.elements | elements} property to a
292
- * Playwright `Locator` representing all elements that match the given CSS selector.
293
- * You can then use other steps like "When I get first element" to work with specific items.
294
- */
295
- export declare function When_I_get_elements_by_selector(this: CustomWorld, selector: string): Promise<void>;
296
- /**
297
- * Gets the first element from the stored elements collection.
298
- *
299
- * ```gherkin
300
- * When I get first element
301
- * ```
302
- *
303
- * @example
304
- * When I get first element
305
- *
306
- * @remarks
307
- * This step requires a preceding step that populates {@link CustomWorld.elements | this.elements}
308
- * (e.g., "When I find elements by selector"). It then selects the very first
309
- * element from that collection and sets it as the {@link CustomWorld.element | current element}.
310
- */
311
- export declare function When_I_get_first_element(this: CustomWorld): Promise<void>;
312
- /**
313
- * Gets the last element from the stored elements collection.
314
- *
315
- * ```gherkin
316
- * When I get last element
317
- * ```
318
- *
319
- * @example
320
- * When I get last element
321
- *
322
- * @remarks
323
- * This step requires a preceding step that populates {@link CustomWorld.elements | this.elements}
324
- * (e.g., "When I find elements by selector"). It then selects the very last
325
- * element from that collection and sets it as the {@link CustomWorld.element | current element}.
326
- */
327
- export declare function When_I_get_last_element(this: CustomWorld): Promise<void>;
328
- /**
329
- * Gets the nth element (1-based index) from the stored elements.
330
- *
331
- * ```gherkin
332
- * When I get {int}st element
333
- * When I get {int}nd element
334
- * When I get {int}rd element
335
- * When I get {int}th element
336
- * ```
337
- *
338
- * @example
339
- * When I get 2nd element
340
- *
341
- * @remarks
342
- * This step requires a preceding step that populates {@link CustomWorld.elements | this.elements}
343
- * (e.g., "When I find elements by selector"). It then selects the element at the
344
- * specified 1-based index from that collection and sets it as the {@link CustomWorld.element | current element}.
345
- * Error handling is included for out-of-bounds indices.
346
- */
347
- export declare function When_I_get_nth_element(this: CustomWorld, index: number): Promise<void>;
348
- /**
349
- * Finds all elements by role and stores them in the elements collection.
350
- *
351
- * ```gherkin
352
- * When I find elements by role {string}
353
- * ```
354
- *
355
- * @example
356
- * When I find elements by role "button"
357
- *
358
- * @remarks
359
- * This step uses `page.getByRole` to find all elements with a specific ARIA role
360
- * and stores them in {@link CustomWorld.elements | this.elements}.
361
- * It includes a check to ensure at least one element is found.
362
- */
363
- export declare function When_I_find_elements_by_role(this: CustomWorld, role: string): Promise<void>;
364
- /**
365
- * Gets the nth element (0-based index) from the stored elements.
366
- *
367
- * ```gherkin
368
- * When I get {int}rd element
369
- * ```
370
- *
371
- * @example
372
- * When I get 3rd element
373
- *
374
- * @remarks
375
- * This step requires a preceding step that populates {@link CustomWorld.elements | this.elements}.
376
- * It selects the element at the specified **0-based index** from the collection
377
- * and sets it as the {@link CustomWorld.element | current element}.
378
- *
379
- * **Note:** Consider using `When I get {int}(?:st|nd|rd|th) element` for a 1-based index
380
- * which is often more user-friendly in Gherkin.
381
- */
382
- export declare function When_I_get_int_rd_element(this: CustomWorld, index: number): Promise<void>;
383
- /**
384
- * Gets the currently focused element and stores it as the current element.
385
- *
386
- * ```gherkin
387
- * When I get focused element
388
- * ```
389
- *
390
- * @example
391
- * When I get focused element
392
- *
393
- * @remarks
394
- * This step uses `page.evaluateHandle` to find the `document.activeElement`
395
- * (the currently focused element in the browser DOM) and sets it as the
396
- * {@link CustomWorld.element | current element}. This is useful for testing focus management.
397
- */
398
- export declare function When_I_get_focused_element(this: CustomWorld): Promise<void>;
399
- /**
400
- * Stores the text content of the current element as an alias in the test data.
401
- *
402
- * ```gherkin
403
- * When I store element text as {string}
404
- * ```
405
- *
406
- * @example
407
- * When I store element text as "greeting"
408
- *
409
- * @remarks
410
- * This step requires a preceding step that sets the {@link CustomWorld.element | current element}.
411
- * It retrieves the `textContent` of that element and stores it in
412
- * {@link CustomWorld.data | this.data} under the provided alias, allowing it to be
413
- * reused in subsequent steps (e.g., in assertions or input fields).
414
- */
415
- export declare function When_I_store_element_text_as(this: CustomWorld, alias: string): Promise<void>;
416
- /**
417
- * Finds a textarea by its label text and stores it as the current element.
418
- *
419
- * ```gherkin
420
- * When I find textarea by label text {string}
421
- * ```
422
- *
423
- * @example
424
- * When I find textarea by label text "Description"
425
- *
426
- * @remarks
427
- * This step uses Playwright's `getByLabel` to locate a textarea associated
428
- * with the given label text. It sets the found textarea as the
429
- * {@link CustomWorld.element | current element}.
430
- */
431
- export declare function When_I_find_textarea_by_label_text(this: CustomWorld, label: string): Promise<void>;
432
- /**
433
- * Finds a textarea by its placeholder text and stores it as the current element.
434
- *
435
- * ```gherkin
436
- * When I find textarea by placeholder text {string}
437
- * ```
438
- *
439
- * @example
440
- * When I find textarea by placeholder text "Type here"
441
- *
442
- * @remarks
443
- * This step uses Playwright's `getByPlaceholder` to locate a textarea
444
- * based on its `placeholder` attribute. It sets the found textarea as the
445
- * {@link CustomWorld.element | current element}.
446
- */
447
- export declare function When_I_find_textarea_by_placeholder_text(this: CustomWorld, placeholder: string): Promise<void>;
448
- /**
449
- * Finds all textareas by label text and stores them as elements.
450
- *
451
- * ```gherkin
452
- * When I find textareas by label text {string}
453
- * ```
454
- *
455
- * @example
456
- * When I find textareas by label text "Comment"
457
- *
458
- * @remarks
459
- * This step uses a CSS selector to find all textareas associated with the
460
- * given label text and stores them in the {@link CustomWorld.elements | elements}
461
- * collection.
462
- */
463
- export declare function When_I_find_textareas_by_label_text(this: CustomWorld, label: string): Promise<void>;
464
- /**
465
- * Finds a textarea by its name attribute and stores it as the current element.
466
- *
467
- * ```gherkin
468
- * When I find textarea by name {string}
469
- * ```
470
- *
471
- * @example
472
- * When I find textarea by name "bio"
473
- *
474
- * @remarks
475
- * This step uses a CSS selector to locate a textarea based on its `name` attribute.
476
- * It sets the found textarea as the {@link CustomWorld.element | current element}.
477
- */
478
- export declare function When_I_find_textarea_by_name(this: CustomWorld, name: string): Promise<void>;
479
- /**
480
- * Finds all textareas by ID and stores them as elements.
481
- *
482
- * ```gherkin
483
- * When I find textareas by ID {string}
484
- * ```
485
- *
486
- * @example
487
- * When I find textareas by ID "my-textarea"
488
- *
489
- * @remarks
490
- * This step uses a CSS selector to find all textareas with the specified ID
491
- * and stores them in the {@link CustomWorld.elements | elements} collection.
492
- */
493
- export declare function When_I_find_textareas_by_ID(this: CustomWorld, id: string): Promise<void>;
494
- /**
495
- * Finds all textareas by placeholder text and stores them as elements.
496
- *
497
- * ```gherkin
498
- * When I find textareas by placeholder text {string}
499
- * ```
500
- *
501
- * @example
502
- * When I find textareas by placeholder text "Type here"
503
- *
504
- * @remarks
505
- * This step uses a CSS selector to find all textareas with the specified
506
- * `placeholder` attribute and stores them in the {@link CustomWorld.elements | elements}
507
- * collection.
508
- */
509
- export declare function When_I_find_textareas_by_placeholder_text_multiple(this: CustomWorld, placeholder: string): Promise<void>;
510
- /**
511
- * Finds an input by its ID and stores it as the current element.
512
- *
513
- * ```gherkin
514
- * When I find input by ID {string}
515
- * ```
516
- *
517
- * @example
518
- * When I find input by ID "email"
519
- *
520
- * @remarks
521
- * This step uses a CSS selector to locate an input element by its ID.
522
- * It sets the found input as the {@link CustomWorld.element | current element}.
523
- */
524
- export declare function When_I_find_input_by_ID(this: CustomWorld, id: string): Promise<void>;
525
- /**
526
- * Finds all inputs by ID and stores them as elements.
527
- *
528
- * ```gherkin
529
- * When I find inputs by ID {string}
530
- * ```
531
- *
532
- * @example
533
- * When I find inputs by ID "email"
534
- *
535
- * @remarks
536
- * This step uses a CSS selector to find all input elements with the specified ID
537
- * and stores them in the {@link CustomWorld.elements | elements} collection.
538
- */
539
- export declare function When_I_find_inputs_by_ID(this: CustomWorld, id: string): Promise<void>;
540
- /**
541
- * Finds an input by its label text and stores it as the current element.
542
- *
543
- * ```gherkin
544
- * When I find input by label text {string}
545
- * ```
546
- *
547
- * @example
548
- * When I find input by label text "Email"
549
- *
550
- * @remarks
551
- * This step uses Playwright's `getByLabel` to locate an input associated
552
- * with the given label text. It sets the found input as the
553
- * {@link CustomWorld.element | current element}.
554
- */
555
- export declare function When_I_find_input_by_label_text(this: CustomWorld, label: string): Promise<void>;
556
- /**
557
- * Finds an input by its name attribute and stores it as the current element.
558
- *
559
- * ```gherkin
560
- * When I find input by name {string}
561
- * ```
562
- * * @example
563
- * When I find input by name "username"
564
- *
565
- * @remarks
566
- * This step uses a CSS selector to locate an input element based on its `name` attribute.
567
- * It sets the found input as the {@link CustomWorld.element | current element}.
568
- */
569
- export declare function When_I_find_input_by_name(this: CustomWorld, name: string): Promise<void>;
570
- /**
571
- * Finds an input by its placeholder text and stores it as the current element.
572
- *
573
- * ```gherkin
574
- * When I find input by placeholder text {string}
575
- * ```
576
- *
577
- * @example
578
- * When I find input by placeholder text "Enter your email"
579
- *
580
- * @remarks
581
- * This step uses Playwright's `getByPlaceholder` to locate an input
582
- * based on its `placeholder` attribute. It sets the found input as the
583
- * {@link CustomWorld.element | current element}.
584
- */
585
- export declare function When_I_find_input_by_placeholder_text(this: CustomWorld, placeholder: string): Promise<void>;
586
- /**
587
- * Finds all inputs by name attribute and stores them as elements.
588
- *
589
- * ```gherkin
590
- * When I find inputs by name {string}
591
- * ```
592
- *
593
- * @example
594
- * When I find inputs by name "username"
595
- *
596
- * @remarks
597
- * This step uses a CSS selector to find all input elements with the specified
598
- * `name` attribute and stores them in the {@link CustomWorld.elements | elements}
599
- * collection.
600
- */
601
- export declare function When_I_find_inputs_by_name_multiple(this: CustomWorld, name: string): Promise<void>;
602
- /**
603
- * Finds all inputs by placeholder text and stores them as elements.
604
- *
605
- * ```gherkin
606
- * When I find inputs by placeholder text {string}
607
- * ```
608
- *
609
- * @example
610
- * When I find inputs by placeholder text "Search"
611
- *
612
- * @remarks
613
- * This step uses a CSS selector to find all input elements with the specified
614
- * `placeholder` attribute and stores them in the {@link CustomWorld.elements | elements}
615
- * collection.
616
- */
617
- export declare function When_I_find_inputs_by_placeholder_text_multiple(this: CustomWorld, placeholder: string): Promise<void>;
618
- /**
619
- * Finds all inputs by label text and stores them as elements.
620
- *
621
- * ```gherkin
622
- * When I find inputs by label text {string}
623
- * ```
624
- *
625
- * @example
626
- * When I find inputs by label text "Email"
627
- *
628
- * @remarks
629
- * This step uses a CSS selector to find all input elements associated with the
630
- * given label text and stores them in the {@link CustomWorld.elements | elements}
631
- * collection.
632
- */
633
- export declare function When_I_find_inputs_by_label_text_multiple(this: CustomWorld, label: string): Promise<void>;
634
- /**
635
- * Finds all inputs by display value (supports alias) and stores them as elements.
636
- *
637
- * ```gherkin
638
- * When I find inputs by display value {string}
639
- * ```
640
- *
641
- * @example
642
- * When I find inputs by display value "John"
643
- * When I find inputs by display value "@userName"
644
- *
645
- * @remarks
646
- * This step searches for all input elements whose `value` attribute matches
647
- * the provided text or resolved alias. The matching inputs are stored in the
648
- * {@link CustomWorld.elements | elements} collection.
649
- */
650
- export declare function When_I_find_inputs_by_display_value_multiple(this: CustomWorld, value: string): Promise<void>;
651
- /**
652
- * Finds an input by display value (supports alias) and stores it as the current element.
653
- *
654
- * ```gherkin
655
- * When I find input by display value {string}
656
- * ```
657
- *
658
- * @example
659
- * When I find input by display value "John"
660
- * When I find input by display value "@userName"
661
- *
662
- * @remarks
663
- * This step searches for a single input element whose `value` attribute matches
664
- * the provided text or resolved alias. It sets the found input as the
665
- * {@link CustomWorld.element | current element}. An `expect` assertion
666
- * is included to ensure the element is visible.
667
- */
668
- export declare function When_I_find_input_by_display_value(this: CustomWorld, value: string): Promise<void>;