playwright-cucumber-ts-steps 1.1.12 → 1.2.0
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.
- package/README.md +1697 -2
- package/dist/backend/actions/click.d.ts +55 -77
- package/dist/backend/actions/click.d.ts.map +1 -1
- package/dist/backend/actions/click.js +125 -103
- package/dist/backend/actions/find.d.ts +48 -121
- package/dist/backend/actions/find.d.ts.map +1 -1
- package/dist/backend/actions/find.js +126 -172
- package/dist/backend/actions/form.d.ts +18 -26
- package/dist/backend/actions/form.d.ts.map +1 -1
- package/dist/backend/actions/form.js +30 -35
- package/dist/backend/actions/formTable.d.ts +4 -9
- package/dist/backend/actions/formTable.d.ts.map +1 -1
- package/dist/backend/actions/formTable.js +13 -11
- package/dist/backend/actions/frames.d.ts +7 -35
- package/dist/backend/actions/frames.d.ts.map +1 -1
- package/dist/backend/actions/frames.js +22 -61
- package/dist/backend/actions/index.d.ts +0 -1
- package/dist/backend/actions/index.d.ts.map +1 -1
- package/dist/backend/actions/index.js +0 -1
- package/dist/backend/actions/inputs.d.ts +33 -77
- package/dist/backend/actions/inputs.d.ts.map +1 -1
- package/dist/backend/actions/inputs.js +92 -116
- package/dist/backend/actions/interactions.d.ts +10 -32
- package/dist/backend/actions/interactions.d.ts.map +1 -1
- package/dist/backend/actions/interactions.js +31 -41
- package/dist/backend/actions/keyboard.d.ts +13 -37
- package/dist/backend/actions/keyboard.d.ts.map +1 -1
- package/dist/backend/actions/keyboard.js +35 -46
- package/dist/backend/actions/misc.d.ts +29 -69
- package/dist/backend/actions/misc.d.ts.map +1 -1
- package/dist/backend/actions/misc.js +77 -98
- package/dist/backend/actions/mobile.d.ts +14 -36
- package/dist/backend/actions/mobile.d.ts.map +1 -1
- package/dist/backend/actions/mobile.js +42 -55
- package/dist/backend/actions/mouse.d.ts +29 -36
- package/dist/backend/actions/mouse.d.ts.map +1 -1
- package/dist/backend/actions/mouse.js +76 -51
- package/dist/backend/actions/navigation.d.ts +11 -23
- package/dist/backend/actions/navigation.d.ts.map +1 -1
- package/dist/backend/actions/navigation.js +32 -32
- package/dist/backend/actions/waits.d.ts +11 -30
- package/dist/backend/actions/waits.d.ts.map +1 -1
- package/dist/backend/actions/waits.js +32 -39
- package/dist/backend/api/assertions.d.ts +6 -15
- package/dist/backend/api/assertions.d.ts.map +1 -1
- package/dist/backend/api/assertions.js +21 -23
- package/dist/backend/api/mock.d.ts +9 -18
- package/dist/backend/api/mock.d.ts.map +1 -1
- package/dist/backend/api/mock.js +24 -22
- package/dist/backend/api/network.d.ts +13 -25
- package/dist/backend/api/network.d.ts.map +1 -1
- package/dist/backend/api/network.js +40 -39
- package/dist/backend/api/requests.d.ts +13 -24
- package/dist/backend/api/requests.d.ts.map +1 -1
- package/dist/backend/api/requests.js +31 -30
- package/dist/backend/assertions/pageState.d.ts +13 -24
- package/dist/backend/assertions/pageState.d.ts.map +1 -1
- package/dist/backend/assertions/pageState.js +31 -29
- package/dist/backend/assertions/text.d.ts +12 -23
- package/dist/backend/assertions/text.d.ts.map +1 -1
- package/dist/backend/assertions/text.js +30 -28
- package/dist/backend/assertions/visibility.d.ts +24 -51
- package/dist/backend/assertions/visibility.d.ts.map +1 -1
- package/dist/backend/assertions/visibility.js +74 -79
- package/dist/backend/auth/index.d.ts +14 -1
- package/dist/backend/auth/index.d.ts.map +1 -1
- package/dist/backend/auth/index.js +26 -8
- package/dist/backend/db/steps.d.ts +58 -18
- package/dist/backend/db/steps.d.ts.map +1 -1
- package/dist/backend/db/steps.js +180 -26
- package/dist/backend/elements/alerts.d.ts +10 -19
- package/dist/backend/elements/alerts.d.ts.map +1 -1
- package/dist/backend/elements/alerts.js +25 -23
- package/dist/backend/elements/forms.d.ts +12 -23
- package/dist/backend/elements/forms.d.ts.map +1 -1
- package/dist/backend/elements/forms.js +30 -29
- package/dist/backend/elements/frames.d.ts +9 -18
- package/dist/backend/elements/frames.d.ts.map +1 -1
- package/dist/backend/elements/frames.js +24 -23
- package/dist/backend/index.d.ts +14 -0
- package/dist/backend/index.d.ts.map +1 -0
- package/dist/backend/index.js +31 -0
- package/dist/metadata.json +1016 -0
- package/package.json +8 -4
|
@@ -1,244 +1,171 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Finds a single element using a CSS or XPath selector.
|
|
3
3
|
* Asserts that exactly one element is found.
|
|
4
|
-
*
|
|
5
|
-
* ```gherkin
|
|
4
|
+
* @example
|
|
6
5
|
* When I find element by selector ".nav-bar"
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
6
|
* @param selector - The CSS or XPath selector string.
|
|
10
7
|
*/
|
|
11
|
-
export declare
|
|
8
|
+
export declare function findElementBySelector(page: any, selector: string): Promise<void>;
|
|
12
9
|
/**
|
|
13
10
|
* Finds an element containing the exact text provided.
|
|
14
|
-
*
|
|
15
|
-
* ```gherkin
|
|
11
|
+
* @example
|
|
16
12
|
* When I find element by text "Submit Order"
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
13
|
* @param text - The exact text content to match.
|
|
20
14
|
*/
|
|
21
|
-
export declare
|
|
15
|
+
export declare function findElementByText(page: any, text: string): Promise<void>;
|
|
22
16
|
/**
|
|
23
17
|
* Finds an element by its `title` attribute.
|
|
24
|
-
*
|
|
25
|
-
* ```gherkin
|
|
18
|
+
* @example
|
|
26
19
|
* When I find element by title "Close Modal"
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
20
|
* @param title - The value of the title attribute.
|
|
30
21
|
*/
|
|
31
|
-
export declare
|
|
22
|
+
export declare function findElementByTitle(page: any, title: string): Promise<void>;
|
|
32
23
|
/**
|
|
33
24
|
* Finds an element by its test ID (usually `data-testid`).
|
|
34
|
-
*
|
|
35
|
-
* ```gherkin
|
|
25
|
+
* @example
|
|
36
26
|
* When I find element by testid "login-form"
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
27
|
* @param testid - The data-testid attribute value.
|
|
40
28
|
*/
|
|
41
|
-
export declare
|
|
29
|
+
export declare function findElementByTestId(page: any, testid: string): Promise<void>;
|
|
42
30
|
/**
|
|
43
31
|
* Finds an element by its ARIA role.
|
|
44
|
-
*
|
|
45
|
-
* ```gherkin
|
|
32
|
+
* @example
|
|
46
33
|
* When I find element by role "button"
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
34
|
* @param role - The ARIA role (e.g., "button", "link", "heading").
|
|
50
35
|
*/
|
|
51
|
-
export declare
|
|
36
|
+
export declare function findElementByRole(page: any, role: string): Promise<void>;
|
|
52
37
|
/**
|
|
53
38
|
* Finds an input element by its placeholder text.
|
|
54
|
-
*
|
|
55
|
-
* ```gherkin
|
|
39
|
+
* @example
|
|
56
40
|
* When I find element by placeholder text "Enter your email"
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
41
|
* @param text - The placeholder text value.
|
|
60
42
|
*/
|
|
61
|
-
export declare
|
|
43
|
+
export declare function findElementByPlaceholder(page: any, text: string): Promise<void>;
|
|
62
44
|
/**
|
|
63
45
|
* Finds a form control associated with a specific label text.
|
|
64
|
-
*
|
|
65
|
-
* ```gherkin
|
|
46
|
+
* @example
|
|
66
47
|
* When I find element by label text "Password"
|
|
67
|
-
* ```
|
|
68
|
-
*
|
|
69
48
|
* @param label - The visible text of the label.
|
|
70
49
|
*/
|
|
71
|
-
export declare
|
|
50
|
+
export declare function findElementByLabel(page: any, label: string): Promise<void>;
|
|
72
51
|
/**
|
|
73
52
|
* Finds an element (usually an image) by its alt text.
|
|
74
|
-
*
|
|
75
|
-
* ```gherkin
|
|
53
|
+
* @example
|
|
76
54
|
* When I find element by alt text "Company Logo"
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
55
|
* @param alt - The value of the alt attribute.
|
|
80
56
|
*/
|
|
81
|
-
export declare
|
|
57
|
+
export declare function findElementByAltText(page: any, alt: string): Promise<void>;
|
|
82
58
|
/**
|
|
83
59
|
* Finds a specific link by its visible text.
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* ```gherkin
|
|
60
|
+
* @example
|
|
87
61
|
* When I find link by text "Read More"
|
|
88
|
-
* ```
|
|
89
|
-
*
|
|
90
62
|
* @param text - The visible text of the link.
|
|
91
63
|
*/
|
|
92
|
-
export declare
|
|
64
|
+
export declare function findLinkByText(page: any, text: string): Promise<void>;
|
|
93
65
|
/**
|
|
94
66
|
* Finds a heading (h1-h6) by its text content.
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* ```gherkin
|
|
67
|
+
* @example
|
|
98
68
|
* When I find heading by text "Dashboard"
|
|
99
|
-
* ```
|
|
100
|
-
*
|
|
101
69
|
* @param text - The text content of the heading.
|
|
102
70
|
*/
|
|
103
|
-
export declare
|
|
71
|
+
export declare function findHeadingByText(page: any, text: string): Promise<void>;
|
|
104
72
|
/**
|
|
105
73
|
* Finds an element by its `name` attribute.
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* ```gherkin
|
|
74
|
+
* @example
|
|
109
75
|
* When I find element by name "csrf_token"
|
|
110
|
-
* ```
|
|
111
|
-
*
|
|
112
76
|
* @param name - The value of the name attribute.
|
|
113
77
|
*/
|
|
114
|
-
export declare
|
|
78
|
+
export declare function findElementByName(page: any, name: string): Promise<void>;
|
|
115
79
|
/**
|
|
116
80
|
* Finds all elements matching a CSS selector and stores them as a list.
|
|
117
|
-
*
|
|
118
|
-
* ```gherkin
|
|
81
|
+
* @example
|
|
119
82
|
* When I find elements by selector "ul > li"
|
|
120
|
-
* ```
|
|
121
|
-
*
|
|
122
83
|
* @param selector - The CSS selector.
|
|
123
84
|
*/
|
|
124
|
-
export declare
|
|
85
|
+
export declare function findElementsBySelector(page: any, selector: string): Promise<void>;
|
|
125
86
|
/**
|
|
126
87
|
* Finds all headings matching specific text.
|
|
127
|
-
*
|
|
128
|
-
* ```gherkin
|
|
88
|
+
* @example
|
|
129
89
|
* When I find headings by text "Article Title"
|
|
130
|
-
* ```
|
|
131
|
-
*
|
|
132
90
|
* @param text - The text to match headings against.
|
|
133
91
|
*/
|
|
134
|
-
export declare
|
|
92
|
+
export declare function findHeadingsByText(page: any, text: string): Promise<void>;
|
|
135
93
|
/**
|
|
136
94
|
* Finds all buttons matching specific text.
|
|
137
95
|
* Supports variable aliasing (e.g., "@buttonName").
|
|
138
|
-
*
|
|
139
|
-
* ```gherkin
|
|
96
|
+
* @example
|
|
140
97
|
* When I find buttons by text "Add to Cart"
|
|
141
|
-
* ```
|
|
142
|
-
*
|
|
143
98
|
* @param text - The button text or an alias (e.g., "@myBtn").
|
|
144
99
|
*/
|
|
145
|
-
export declare
|
|
100
|
+
export declare function findButtonsByText(page: any, text: string): Promise<void>;
|
|
146
101
|
/**
|
|
147
102
|
* Selects the first element from the currently stored list of elements.
|
|
148
|
-
*
|
|
149
|
-
* ```gherkin
|
|
103
|
+
* @example
|
|
150
104
|
* When I get first element
|
|
151
|
-
* ```
|
|
152
105
|
*/
|
|
153
|
-
export declare
|
|
106
|
+
export declare function getFirstElement(page: any): Promise<void>;
|
|
154
107
|
/**
|
|
155
108
|
* Selects the last element from the currently stored list of elements.
|
|
156
|
-
*
|
|
157
|
-
* ```gherkin
|
|
109
|
+
* @example
|
|
158
110
|
* When I get last element
|
|
159
|
-
* ```
|
|
160
111
|
*/
|
|
161
|
-
export declare
|
|
112
|
+
export declare function getLastElement(page: any): Promise<void>;
|
|
162
113
|
/**
|
|
163
114
|
* Selects the nth element from the currently stored list.
|
|
164
115
|
* Uses 1-based indexing (e.g., 1st, 2nd, 3rd).
|
|
165
|
-
*
|
|
166
|
-
* ```gherkin
|
|
116
|
+
* @example
|
|
167
117
|
* When I get 2nd element
|
|
168
118
|
* When I get 10th element
|
|
169
|
-
* ```
|
|
170
|
-
*
|
|
171
119
|
* @param indexStr - The number captured from the regex (e.g., "2").
|
|
172
120
|
*/
|
|
173
|
-
export declare
|
|
121
|
+
export declare function getNthElement(page: any, indexStr: string): Promise<void>;
|
|
174
122
|
/**
|
|
175
123
|
* Selects the element that currently has browser focus.
|
|
176
|
-
*
|
|
177
|
-
* ```gherkin
|
|
124
|
+
* @example
|
|
178
125
|
* When I get focused element
|
|
179
|
-
* ```
|
|
180
126
|
*/
|
|
181
|
-
export declare
|
|
127
|
+
export declare function getFocusedElement(page: any): Promise<void>;
|
|
182
128
|
/**
|
|
183
129
|
* Finds an input field by its ID attribute.
|
|
184
|
-
*
|
|
185
|
-
* ```gherkin
|
|
130
|
+
* @example
|
|
186
131
|
* When I find input by ID "user_email"
|
|
187
|
-
* ```
|
|
188
|
-
*
|
|
189
132
|
* @param id - The ID string.
|
|
190
133
|
*/
|
|
191
|
-
export declare
|
|
134
|
+
export declare function findInputById(page: any, id: string): Promise<void>;
|
|
192
135
|
/**
|
|
193
136
|
* Finds an input field by its name attribute.
|
|
194
|
-
*
|
|
195
|
-
* ```gherkin
|
|
137
|
+
* @example
|
|
196
138
|
* When I find input by name "password"
|
|
197
|
-
* ```
|
|
198
|
-
*
|
|
199
139
|
* @param name - The name attribute value.
|
|
200
140
|
*/
|
|
201
|
-
export declare
|
|
141
|
+
export declare function findInputByName(page: any, name: string): Promise<void>;
|
|
202
142
|
/**
|
|
203
143
|
* Finds an input field by its placeholder text.
|
|
204
|
-
*
|
|
205
|
-
* ```gherkin
|
|
144
|
+
* @example
|
|
206
145
|
* When I find input by placeholder text "Search products..."
|
|
207
|
-
* ```
|
|
208
|
-
*
|
|
209
146
|
* @param placeholder - The placeholder text.
|
|
210
147
|
*/
|
|
211
|
-
export declare
|
|
148
|
+
export declare function findInputByPlaceholder(page: any, placeholder: string): Promise<void>;
|
|
212
149
|
/**
|
|
213
150
|
* Finds an input field that currently has a specific value.
|
|
214
151
|
* Supports variable aliasing (e.g., "@storedValue").
|
|
215
|
-
*
|
|
216
|
-
* ```gherkin
|
|
152
|
+
* @example
|
|
217
153
|
* When I find input by display value "John"
|
|
218
|
-
* ```
|
|
219
|
-
*
|
|
220
154
|
* @param value - The value to match.
|
|
221
155
|
*/
|
|
222
|
-
export declare
|
|
156
|
+
export declare function findInputByValue(page: any, value: string): Promise<void>;
|
|
223
157
|
/**
|
|
224
158
|
* Finds a textarea associated with a specific label.
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* ```gherkin
|
|
159
|
+
* @example
|
|
228
160
|
* When I find textarea by label text "Description"
|
|
229
|
-
* ```
|
|
230
|
-
*
|
|
231
161
|
* @param label - The visible text of the label.
|
|
232
162
|
*/
|
|
233
|
-
export declare
|
|
163
|
+
export declare function findTextareaByLabel(page: any, label: string): Promise<void>;
|
|
234
164
|
/**
|
|
235
165
|
* Reads the text content of the currently active element and stores it in a variable.
|
|
236
|
-
*
|
|
237
|
-
* ```gherkin
|
|
166
|
+
* @example
|
|
238
167
|
* When I store element text as "confirmationCode"
|
|
239
|
-
* ```
|
|
240
|
-
*
|
|
241
168
|
* @param alias - The name of the variable to store the text in (without "@").
|
|
242
169
|
*/
|
|
243
|
-
export declare
|
|
170
|
+
export declare function storeElementText(page: any, alias: string): Promise<void>;
|
|
244
171
|
//# sourceMappingURL=find.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/find.ts"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/find.ts"],"names":[],"mappings":"AAeA;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKtF;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK9E;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKhF;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE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