playwright-cucumber-ts-steps 1.2.0 → 1.3.1
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/dist/backend/actions/click.d.ts +107 -44
- package/dist/backend/actions/click.d.ts.map +1 -1
- package/dist/backend/actions/click.js +197 -60
- package/dist/backend/actions/find.d.ts.map +1 -1
- package/dist/backend/actions/find.js +1 -0
- package/dist/backend/actions/form.d.ts +13 -18
- package/dist/backend/actions/form.d.ts.map +1 -1
- package/dist/backend/actions/form.js +36 -24
- package/dist/backend/actions/formTable.d.ts +10 -4
- package/dist/backend/actions/formTable.d.ts.map +1 -1
- package/dist/backend/actions/formTable.js +34 -14
- package/dist/backend/actions/frames.d.ts +8 -12
- package/dist/backend/actions/frames.d.ts.map +1 -1
- package/dist/backend/actions/frames.js +26 -18
- package/dist/backend/actions/index.d.ts +14 -0
- package/dist/backend/actions/index.d.ts.map +1 -1
- package/dist/backend/actions/index.js +30 -0
- package/dist/backend/actions/inputs.d.ts +15 -43
- package/dist/backend/actions/inputs.d.ts.map +1 -1
- package/dist/backend/actions/inputs.js +39 -59
- package/dist/backend/actions/interactions.d.ts +28 -20
- package/dist/backend/actions/interactions.d.ts.map +1 -1
- package/dist/backend/actions/interactions.js +95 -27
- package/dist/backend/actions/keyboard.d.ts +6 -20
- package/dist/backend/actions/keyboard.d.ts.map +1 -1
- package/dist/backend/actions/keyboard.js +13 -26
- package/dist/backend/actions/misc.d.ts +20 -38
- package/dist/backend/actions/misc.d.ts.map +1 -1
- package/dist/backend/actions/misc.js +81 -53
- package/dist/backend/actions/mobile.d.ts +9 -24
- package/dist/backend/actions/mobile.d.ts.map +1 -1
- package/dist/backend/actions/mobile.js +19 -31
- package/dist/backend/actions/mouse.d.ts +17 -37
- package/dist/backend/actions/mouse.d.ts.map +1 -1
- package/dist/backend/actions/mouse.js +37 -47
- package/dist/backend/actions/navigation.d.ts.map +1 -1
- package/dist/backend/actions/navigation.js +6 -5
- package/dist/backend/actions/visual.d.ts +47 -0
- package/dist/backend/actions/visual.d.ts.map +1 -0
- package/dist/backend/actions/visual.js +97 -0
- package/dist/backend/actions/waits.d.ts +13 -14
- package/dist/backend/actions/waits.d.ts.map +1 -1
- package/dist/backend/actions/waits.js +31 -21
- package/dist/backend/api/assertions.d.ts +7 -13
- package/dist/backend/api/assertions.d.ts.map +1 -1
- package/dist/backend/api/assertions.js +29 -18
- package/dist/backend/api/index.d.ts +4 -0
- package/dist/backend/api/index.d.ts.map +1 -1
- package/dist/backend/api/index.js +20 -0
- package/dist/backend/api/mock.d.ts +9 -15
- package/dist/backend/api/mock.d.ts.map +1 -1
- package/dist/backend/api/mock.js +21 -18
- package/dist/backend/api/network.d.ts +6 -12
- package/dist/backend/api/network.d.ts.map +1 -1
- package/dist/backend/api/network.js +13 -18
- package/dist/backend/api/requests.d.ts +11 -18
- package/dist/backend/api/requests.d.ts.map +1 -1
- package/dist/backend/api/requests.js +28 -23
- package/dist/backend/api/state.d.ts.map +1 -1
- package/dist/backend/assertions/document.d.ts +61 -0
- package/dist/backend/assertions/document.d.ts.map +1 -0
- package/dist/backend/assertions/document.js +166 -0
- package/dist/backend/assertions/elements.d.ts +163 -0
- package/dist/backend/assertions/elements.d.ts.map +1 -0
- package/dist/backend/assertions/elements.js +441 -0
- package/dist/backend/assertions/expectVisible.d.ts +6 -2
- package/dist/backend/assertions/expectVisible.d.ts.map +1 -1
- package/dist/backend/assertions/expectVisible.js +28 -4
- package/dist/backend/assertions/forms.d.ts +43 -0
- package/dist/backend/assertions/forms.d.ts.map +1 -0
- package/dist/backend/assertions/forms.js +126 -0
- package/dist/backend/assertions/index.d.ts +13 -0
- package/dist/backend/assertions/index.d.ts.map +1 -1
- package/dist/backend/assertions/index.js +29 -0
- package/dist/backend/assertions/pageState.d.ts +12 -17
- package/dist/backend/assertions/pageState.d.ts.map +1 -1
- package/dist/backend/assertions/pageState.js +26 -21
- package/dist/backend/assertions/storage.d.ts +67 -0
- package/dist/backend/assertions/storage.d.ts.map +1 -0
- package/dist/backend/assertions/storage.js +220 -0
- package/dist/backend/assertions/text.d.ts +114 -34
- package/dist/backend/assertions/text.d.ts.map +1 -1
- package/dist/backend/assertions/text.js +227 -39
- package/dist/backend/assertions/visibility.d.ts +42 -32
- package/dist/backend/assertions/visibility.d.ts.map +1 -1
- package/dist/backend/assertions/visibility.js +103 -51
- package/dist/backend/auth/index.d.ts +6 -6
- package/dist/backend/auth/index.d.ts.map +1 -1
- package/dist/backend/auth/index.js +12 -6
- package/dist/backend/db/index.d.ts +2 -1
- package/dist/backend/db/index.d.ts.map +1 -1
- package/dist/backend/db/index.js +17 -1
- package/dist/backend/db/state.d.ts.map +1 -1
- package/dist/backend/db/state.js +1 -0
- package/dist/backend/db/steps.d.ts +20 -34
- package/dist/backend/db/steps.d.ts.map +1 -1
- package/dist/backend/db/steps.js +44 -44
- package/dist/backend/elements/alerts.d.ts +5 -11
- package/dist/backend/elements/alerts.d.ts.map +1 -1
- package/dist/backend/elements/alerts.js +12 -14
- package/dist/backend/elements/find.d.ts +140 -0
- package/dist/backend/elements/find.d.ts.map +1 -0
- package/dist/backend/elements/find.js +346 -0
- package/dist/backend/elements/forms.d.ts +12 -19
- package/dist/backend/elements/forms.d.ts.map +1 -1
- package/dist/backend/elements/forms.js +31 -24
- package/dist/backend/elements/frames.d.ts +9 -17
- package/dist/backend/elements/frames.d.ts.map +1 -1
- package/dist/backend/elements/frames.js +27 -20
- package/dist/backend/elements/index.d.ts +5 -0
- package/dist/backend/elements/index.d.ts.map +1 -1
- package/dist/backend/elements/index.js +21 -0
- package/dist/backend/index.d.ts +3 -2
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/backend/index.js +4 -2
- package/dist/backend/utils/fixtures.d.ts +16 -0
- package/dist/backend/utils/fixtures.d.ts.map +1 -0
- package/dist/backend/utils/fixtures.js +51 -0
- package/dist/backend/utils/resolver.d.ts +6 -0
- package/dist/backend/utils/resolver.d.ts.map +1 -0
- package/dist/backend/utils/resolver.js +19 -0
- package/dist/backend/utils/state.d.ts +18 -1
- package/dist/backend/utils/state.d.ts.map +1 -1
- package/dist/backend/utils/state.js +62 -0
- package/dist/component/index.d.ts +3 -0
- package/dist/component/index.d.ts.map +1 -0
- package/dist/component/index.js +6 -0
- package/dist/component/runner.d.ts +18 -0
- package/dist/component/runner.d.ts.map +1 -0
- package/dist/component/runner.js +58 -0
- package/dist/core/registry.d.ts +2 -1
- package/dist/core/registry.d.ts.map +1 -1
- package/dist/core/registry.js +2 -1
- package/dist/core/runner.d.ts +2 -2
- package/dist/core/runner.d.ts.map +1 -1
- package/dist/core/runner.js +213 -123
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/metadata.json +682 -616
- package/dist/reporting/index.d.ts +2 -3
- package/dist/reporting/index.d.ts.map +1 -1
- package/dist/reporting/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,111 +1,174 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Clicks on the currently stored (active) element.
|
|
3
|
-
* @
|
|
4
|
-
*
|
|
3
|
+
* @param page - The Playwright page object
|
|
4
|
+
* @param table - Optional table data for click options
|
|
5
|
+
* @example When I click
|
|
5
6
|
*/
|
|
6
7
|
export declare function clickStoredElement(page: any, table?: any): Promise<void>;
|
|
7
8
|
/**
|
|
8
9
|
* Clicks on an element matching the given CSS/XPath selector.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param
|
|
10
|
+
* Supports fixtures for reusable selectors.
|
|
11
|
+
* @param page - The Playwright page object
|
|
12
|
+
* @param selectorKey - The selector key (can be a fixture key or raw CSS/XPath selector)
|
|
13
|
+
* @param table - Optional table data for click options
|
|
14
|
+
* @example When I click on element ".my-element"
|
|
15
|
+
* When I click on element "login.submitButton"
|
|
12
16
|
*/
|
|
13
|
-
export declare function clickElementBySelector(page: any,
|
|
17
|
+
export declare function clickElementBySelector(page: any, selectorKey: string, table?: any): Promise<void>;
|
|
14
18
|
/**
|
|
15
19
|
* Clicks on a button role element with the specified label.
|
|
16
|
-
* @
|
|
17
|
-
*
|
|
18
|
-
* @param
|
|
20
|
+
* @param page - The Playwright page object
|
|
21
|
+
* @param label - The button label text
|
|
22
|
+
* @param table - Optional table data for click options
|
|
23
|
+
* @example When I click on button "Submit"
|
|
19
24
|
*/
|
|
20
25
|
export declare function clickButtonByLabel(page: any, label: string, table?: any): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Clicks on a button role element with the EXACT specified text.
|
|
28
|
+
* @example When I click on exact button text "Submit"
|
|
29
|
+
*/
|
|
30
|
+
export declare function clickButtonByExactText(page: any, exactText: string, table?: any): Promise<void>;
|
|
21
31
|
/**
|
|
22
32
|
* Clicks on a link role element with the specified text.
|
|
23
|
-
* @
|
|
24
|
-
*
|
|
25
|
-
* @param
|
|
33
|
+
* @param page - The Playwright page object
|
|
34
|
+
* @param text - The link text
|
|
35
|
+
* @param table - Optional table data for click options
|
|
36
|
+
* @example When I click on link "Home"
|
|
26
37
|
*/
|
|
27
38
|
export declare function clickLinkByText(page: any, text: string, table?: any): Promise<void>;
|
|
28
39
|
/**
|
|
29
40
|
* Clicks on a form label element.
|
|
30
|
-
* @
|
|
31
|
-
*
|
|
32
|
-
* @param
|
|
41
|
+
* @param page - The Playwright page object
|
|
42
|
+
* @param labelText - The label text
|
|
43
|
+
* @param table - Optional table data for click options
|
|
44
|
+
* @example When I click on label "Email"
|
|
33
45
|
*/
|
|
34
46
|
export declare function clickLabelByText(page: any, labelText: string, table?: any): Promise<void>;
|
|
35
47
|
/**
|
|
36
48
|
* Clicks on the first visible element containing the specified text (partial match).
|
|
37
|
-
* @
|
|
38
|
-
*
|
|
39
|
-
* @param
|
|
49
|
+
* @param page - The Playwright page object
|
|
50
|
+
* @param rawText - The text to search for (can be a variable alias starting with @)
|
|
51
|
+
* @param table - Optional table data for click options
|
|
52
|
+
* @example When I click on text "Login"
|
|
40
53
|
*/
|
|
41
54
|
export declare function clickByText(page: any, rawText: string, table?: any): Promise<void>;
|
|
42
55
|
/**
|
|
43
56
|
* Clicks on an element containing the EXACT specified text.
|
|
44
|
-
* @
|
|
45
|
-
*
|
|
46
|
-
* @param
|
|
57
|
+
* @param page - The Playwright page object
|
|
58
|
+
* @param exactText - The exact text to match
|
|
59
|
+
* @param table - Optional table data for click options
|
|
60
|
+
* @example When I click on exact text "Submit"
|
|
47
61
|
*/
|
|
48
62
|
export declare function clickByExactText(page: any, exactText: string, table?: any): Promise<void>;
|
|
49
63
|
/**
|
|
50
64
|
* Clicks on a selector provided via Regex match.
|
|
51
|
-
* @
|
|
52
|
-
*
|
|
65
|
+
* @param page - The Playwright page object
|
|
66
|
+
* @param selector - The CSS selector string
|
|
67
|
+
* @example When I click on selector "#btn-id"
|
|
53
68
|
*/
|
|
54
69
|
export declare function clickByRegexSelector(page: any, selector: string): Promise<void>;
|
|
55
70
|
/**
|
|
56
71
|
* Iterates through ALL currently stored active elements and clicks them one by one.
|
|
57
|
-
* @
|
|
58
|
-
*
|
|
72
|
+
* @param page - The Playwright page object
|
|
73
|
+
* @param table - Optional table data for click options
|
|
74
|
+
* @example When I click all
|
|
59
75
|
*/
|
|
60
76
|
export declare function clickAllStoredElements(page: any, table?: any): Promise<void>;
|
|
61
77
|
/**
|
|
62
78
|
* Double-clicks on the currently stored (active) element.
|
|
63
|
-
* @
|
|
64
|
-
*
|
|
79
|
+
* @param page - The Playwright page object
|
|
80
|
+
* @param table - Optional table data for click options
|
|
81
|
+
* @example When I double click
|
|
65
82
|
*/
|
|
66
83
|
export declare function doubleClickStoredElement(page: any, table?: any): Promise<void>;
|
|
67
84
|
/**
|
|
68
85
|
* Double-clicks on the first element containing the specified text.
|
|
69
|
-
* @
|
|
70
|
-
*
|
|
86
|
+
* @param page - The Playwright page object
|
|
87
|
+
* @param text - The text to search for
|
|
88
|
+
* @param table - Optional table data for click options
|
|
89
|
+
* @example When I double click on text "Button"
|
|
71
90
|
*/
|
|
72
91
|
export declare function doubleClickByText(page: any, text: string, table?: any): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Double-clicks on the first element containing the EXACT specified text.
|
|
94
|
+
* @example When I double click on exact text "Button"
|
|
95
|
+
*/
|
|
96
|
+
export declare function doubleClickByExactText(page: any, exactText: string, table?: any): Promise<void>;
|
|
73
97
|
/**
|
|
74
98
|
* Double-clicks at specific X, Y coordinates on the page.
|
|
75
|
-
* @
|
|
76
|
-
*
|
|
99
|
+
* @param page - The Playwright page object
|
|
100
|
+
* @param x - The X coordinate
|
|
101
|
+
* @param y - The Y coordinate
|
|
102
|
+
* @param table - Optional table data for click options
|
|
103
|
+
* @example When I double click position 100 200
|
|
77
104
|
*/
|
|
78
105
|
export declare function doubleClickPosition(page: any, x: number, y: number, table?: any): Promise<void>;
|
|
79
106
|
/**
|
|
80
107
|
* Right-clicks (Context Click) on the currently stored element.
|
|
81
|
-
* @
|
|
82
|
-
*
|
|
108
|
+
* @param page - The Playwright page object
|
|
109
|
+
* @param table - Optional table data for click options
|
|
110
|
+
* @example When I right click
|
|
83
111
|
*/
|
|
84
112
|
export declare function rightClickStoredElement(page: any, table?: any): Promise<void>;
|
|
85
113
|
/**
|
|
86
114
|
* Right-clicks on the first element containing the specified text.
|
|
87
|
-
* @
|
|
88
|
-
*
|
|
115
|
+
* @param page - The Playwright page object
|
|
116
|
+
* @param text - The text to search for
|
|
117
|
+
* @param table - Optional table data for click options
|
|
118
|
+
* @example When I right click on text "Menu"
|
|
89
119
|
*/
|
|
90
120
|
export declare function rightClickByText(page: any, text: string, table?: any): Promise<void>;
|
|
91
121
|
/**
|
|
92
122
|
* Right-clicks at specific X, Y coordinates on the page.
|
|
93
|
-
* @
|
|
94
|
-
*
|
|
123
|
+
* @param page - The Playwright page object
|
|
124
|
+
* @param x - The X coordinate
|
|
125
|
+
* @param y - The Y coordinate
|
|
126
|
+
* @param table - Optional table data for click options
|
|
127
|
+
* @example When I right click position 100 200
|
|
95
128
|
*/
|
|
96
129
|
export declare function rightClickPosition(page: any, x: number, y: number, table?: any): Promise<void>;
|
|
97
130
|
/**
|
|
98
131
|
* Clicks on the Nth element containing the specified text.
|
|
99
132
|
* Handles 1st, 2nd, 3rd, 4th, etc.
|
|
100
|
-
* @
|
|
101
|
-
*
|
|
102
|
-
*
|
|
133
|
+
* @param page - The Playwright page object
|
|
134
|
+
* @param indexStr - The index string (1st, 2nd, 3rd, etc.)
|
|
135
|
+
* @param text - The text to search for
|
|
136
|
+
* @param table - Optional table data for click options
|
|
137
|
+
* @example When I click on 1st element "Login"
|
|
138
|
+
* When I click on 2nd element "Submit"
|
|
103
139
|
*/
|
|
104
140
|
export declare function clickNthElementByText(page: any, indexStr: string, text: string, table?: any): Promise<void>;
|
|
105
141
|
/**
|
|
106
142
|
* Clicks on the Nth element matching a CSS or XPath selector.
|
|
107
|
-
* @
|
|
108
|
-
*
|
|
109
|
-
|
|
110
|
-
|
|
143
|
+
* @param page - The Playwright page object
|
|
144
|
+
* @param indexStr - The index string (1st, 2nd, 3rd, etc.)
|
|
145
|
+
* @param selectorKey - The selector key (can be a fixture key or raw CSS/XPath selector)
|
|
146
|
+
* @param table - Optional table data for click options
|
|
147
|
+
* @example When I click on 1st selector ".btn"
|
|
148
|
+
*/
|
|
149
|
+
export declare function clickNthElementBySelector(page: any, indexStr: string, selectorKey: string, table?: any): Promise<void>;
|
|
150
|
+
/**
|
|
151
|
+
* Clicks on a specific column in a specific row of a table.
|
|
152
|
+
* @param page - The Playwright page object
|
|
153
|
+
* @param columnIndex - The 1-based index of the column to click (1st, 2nd, 3rd, etc.)
|
|
154
|
+
* @param rowIndex - The selector key for the row (can be a fixture key or raw CSS selector)
|
|
155
|
+
* @param table - Optional table data for click options
|
|
156
|
+
* @example And I click on column 1 in row 1
|
|
157
|
+
* @example And I click on column 2 in row 3
|
|
158
|
+
* @example And I click on column 3 in row 2
|
|
159
|
+
* @example And I click on column 4 in row 5
|
|
160
|
+
*/
|
|
161
|
+
export declare function clickOnColumnInRow(page: any, columnIndex: number, rowIndex: number, table?: any): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Clicks on a specific column in a row identified by a selector.
|
|
164
|
+
* @param page - The Playwright page object
|
|
165
|
+
* @param columnIndex - The 1-based index of the column to click
|
|
166
|
+
* @param rowSelectorKey - The selector key for the row (can be a fixture key or raw CSS selector)
|
|
167
|
+
* @param table - Optional table data for click options
|
|
168
|
+
* @example When I click on 1st column in row "table#users tbody tr:first-child"
|
|
169
|
+
* @example When I click on 2nd column in row "tr.user-row"
|
|
170
|
+
* @example When I click on 3rd column in row ".data-table tbody tr:last-child"
|
|
171
|
+
* @example When I click on 4th column in row "tr[data-id='123']"
|
|
172
|
+
*/
|
|
173
|
+
export declare function clickOnNthColumnInRow(page: any, columnIndex: number, rowSelectorKey: string, table?: any): Promise<void>;
|
|
111
174
|
//# sourceMappingURL=click.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"click.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/click.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"click.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/click.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.clickStoredElement = clickStoredElement;
|
|
4
4
|
exports.clickElementBySelector = clickElementBySelector;
|
|
5
5
|
exports.clickButtonByLabel = clickButtonByLabel;
|
|
6
|
+
exports.clickButtonByExactText = clickButtonByExactText;
|
|
6
7
|
exports.clickLinkByText = clickLinkByText;
|
|
7
8
|
exports.clickLabelByText = clickLabelByText;
|
|
8
9
|
exports.clickByText = clickByText;
|
|
@@ -11,21 +12,27 @@ exports.clickByRegexSelector = clickByRegexSelector;
|
|
|
11
12
|
exports.clickAllStoredElements = clickAllStoredElements;
|
|
12
13
|
exports.doubleClickStoredElement = doubleClickStoredElement;
|
|
13
14
|
exports.doubleClickByText = doubleClickByText;
|
|
15
|
+
exports.doubleClickByExactText = doubleClickByExactText;
|
|
14
16
|
exports.doubleClickPosition = doubleClickPosition;
|
|
15
17
|
exports.rightClickStoredElement = rightClickStoredElement;
|
|
16
18
|
exports.rightClickByText = rightClickByText;
|
|
17
19
|
exports.rightClickPosition = rightClickPosition;
|
|
18
20
|
exports.clickNthElementByText = clickNthElementByText;
|
|
19
21
|
exports.clickNthElementBySelector = clickNthElementBySelector;
|
|
22
|
+
exports.clickOnColumnInRow = clickOnColumnInRow;
|
|
23
|
+
exports.clickOnNthColumnInRow = clickOnNthColumnInRow;
|
|
24
|
+
//src/backend/actions/click.ts
|
|
20
25
|
const registry_1 = require("../../core/registry");
|
|
26
|
+
const fixtures_1 = require("../utils/fixtures");
|
|
21
27
|
const state_1 = require("../utils/state");
|
|
22
28
|
// ==================================================
|
|
23
29
|
// CORE FUNCTIONS
|
|
24
30
|
// ==================================================
|
|
25
31
|
/**
|
|
26
32
|
* Clicks on the currently stored (active) element.
|
|
27
|
-
* @
|
|
28
|
-
*
|
|
33
|
+
* @param page - The Playwright page object
|
|
34
|
+
* @param table - Optional table data for click options
|
|
35
|
+
* @example When I click
|
|
29
36
|
*/
|
|
30
37
|
async function clickStoredElement(page, table) {
|
|
31
38
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -35,12 +42,18 @@ async function clickStoredElement(page, table) {
|
|
|
35
42
|
}
|
|
36
43
|
/**
|
|
37
44
|
* Clicks on an element matching the given CSS/XPath selector.
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @param
|
|
45
|
+
* Supports fixtures for reusable selectors.
|
|
46
|
+
* @param page - The Playwright page object
|
|
47
|
+
* @param selectorKey - The selector key (can be a fixture key or raw CSS/XPath selector)
|
|
48
|
+
* @param table - Optional table data for click options
|
|
49
|
+
* @example When I click on element ".my-element"
|
|
50
|
+
* When I click on element "login.submitButton"
|
|
41
51
|
*/
|
|
42
|
-
async function clickElementBySelector(page,
|
|
52
|
+
async function clickElementBySelector(page, selectorKey, table) {
|
|
43
53
|
const options = (0, state_1.parseClickOptions)(table);
|
|
54
|
+
// Resolve selector from fixtures or use raw value
|
|
55
|
+
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
56
|
+
const selector = (0, fixtures_1.getFixtureValue)(selectors, selectorKey);
|
|
44
57
|
const element = page.locator(selector);
|
|
45
58
|
await element.click(options);
|
|
46
59
|
(0, state_1.setActiveElement)(page, element);
|
|
@@ -48,9 +61,10 @@ async function clickElementBySelector(page, selector, table) {
|
|
|
48
61
|
}
|
|
49
62
|
/**
|
|
50
63
|
* Clicks on a button role element with the specified label.
|
|
51
|
-
* @
|
|
52
|
-
*
|
|
53
|
-
* @param
|
|
64
|
+
* @param page - The Playwright page object
|
|
65
|
+
* @param label - The button label text
|
|
66
|
+
* @param table - Optional table data for click options
|
|
67
|
+
* @example When I click on button "Submit"
|
|
54
68
|
*/
|
|
55
69
|
async function clickButtonByLabel(page, label, table) {
|
|
56
70
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -59,11 +73,23 @@ async function clickButtonByLabel(page, label, table) {
|
|
|
59
73
|
(0, state_1.setActiveElement)(page, button);
|
|
60
74
|
console.log(`🖱️ Clicked on button "${label}"`);
|
|
61
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Clicks on a button role element with the EXACT specified text.
|
|
78
|
+
* @example When I click on exact button text "Submit"
|
|
79
|
+
*/
|
|
80
|
+
async function clickButtonByExactText(page, exactText, table) {
|
|
81
|
+
const options = (0, state_1.parseClickOptions)(table);
|
|
82
|
+
const button = page.getByRole("button", { name: exactText });
|
|
83
|
+
await button.click(options);
|
|
84
|
+
(0, state_1.setActiveElement)(page, button);
|
|
85
|
+
console.log(`🖱️ Clicked on exact button text "${exactText}"`);
|
|
86
|
+
}
|
|
62
87
|
/**
|
|
63
88
|
* Clicks on a link role element with the specified text.
|
|
64
|
-
* @
|
|
65
|
-
*
|
|
66
|
-
* @param
|
|
89
|
+
* @param page - The Playwright page object
|
|
90
|
+
* @param text - The link text
|
|
91
|
+
* @param table - Optional table data for click options
|
|
92
|
+
* @example When I click on link "Home"
|
|
67
93
|
*/
|
|
68
94
|
async function clickLinkByText(page, text, table) {
|
|
69
95
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -74,9 +100,10 @@ async function clickLinkByText(page, text, table) {
|
|
|
74
100
|
}
|
|
75
101
|
/**
|
|
76
102
|
* Clicks on a form label element.
|
|
77
|
-
* @
|
|
78
|
-
*
|
|
79
|
-
* @param
|
|
103
|
+
* @param page - The Playwright page object
|
|
104
|
+
* @param labelText - The label text
|
|
105
|
+
* @param table - Optional table data for click options
|
|
106
|
+
* @example When I click on label "Email"
|
|
80
107
|
*/
|
|
81
108
|
async function clickLabelByText(page, labelText, table) {
|
|
82
109
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -87,9 +114,10 @@ async function clickLabelByText(page, labelText, table) {
|
|
|
87
114
|
}
|
|
88
115
|
/**
|
|
89
116
|
* Clicks on the first visible element containing the specified text (partial match).
|
|
90
|
-
* @
|
|
91
|
-
*
|
|
92
|
-
* @param
|
|
117
|
+
* @param page - The Playwright page object
|
|
118
|
+
* @param rawText - The text to search for (can be a variable alias starting with @)
|
|
119
|
+
* @param table - Optional table data for click options
|
|
120
|
+
* @example When I click on text "Login"
|
|
93
121
|
*/
|
|
94
122
|
async function clickByText(page, rawText, table) {
|
|
95
123
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -111,9 +139,10 @@ async function clickByText(page, rawText, table) {
|
|
|
111
139
|
}
|
|
112
140
|
/**
|
|
113
141
|
* Clicks on an element containing the EXACT specified text.
|
|
114
|
-
* @
|
|
115
|
-
*
|
|
116
|
-
* @param
|
|
142
|
+
* @param page - The Playwright page object
|
|
143
|
+
* @param exactText - The exact text to match
|
|
144
|
+
* @param table - Optional table data for click options
|
|
145
|
+
* @example When I click on exact text "Submit"
|
|
117
146
|
*/
|
|
118
147
|
async function clickByExactText(page, exactText, table) {
|
|
119
148
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -125,8 +154,9 @@ async function clickByExactText(page, exactText, table) {
|
|
|
125
154
|
}
|
|
126
155
|
/**
|
|
127
156
|
* Clicks on a selector provided via Regex match.
|
|
128
|
-
* @
|
|
129
|
-
*
|
|
157
|
+
* @param page - The Playwright page object
|
|
158
|
+
* @param selector - The CSS selector string
|
|
159
|
+
* @example When I click on selector "#btn-id"
|
|
130
160
|
*/
|
|
131
161
|
async function clickByRegexSelector(page, selector) {
|
|
132
162
|
const locator = page.locator(selector);
|
|
@@ -136,8 +166,9 @@ async function clickByRegexSelector(page, selector) {
|
|
|
136
166
|
}
|
|
137
167
|
/**
|
|
138
168
|
* Iterates through ALL currently stored active elements and clicks them one by one.
|
|
139
|
-
* @
|
|
140
|
-
*
|
|
169
|
+
* @param page - The Playwright page object
|
|
170
|
+
* @param table - Optional table data for click options
|
|
171
|
+
* @example When I click all
|
|
141
172
|
*/
|
|
142
173
|
async function clickAllStoredElements(page, table) {
|
|
143
174
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -155,8 +186,9 @@ async function clickAllStoredElements(page, table) {
|
|
|
155
186
|
}
|
|
156
187
|
/**
|
|
157
188
|
* Double-clicks on the currently stored (active) element.
|
|
158
|
-
* @
|
|
159
|
-
*
|
|
189
|
+
* @param page - The Playwright page object
|
|
190
|
+
* @param table - Optional table data for click options
|
|
191
|
+
* @example When I double click
|
|
160
192
|
*/
|
|
161
193
|
async function doubleClickStoredElement(page, table) {
|
|
162
194
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -166,8 +198,10 @@ async function doubleClickStoredElement(page, table) {
|
|
|
166
198
|
}
|
|
167
199
|
/**
|
|
168
200
|
* Double-clicks on the first element containing the specified text.
|
|
169
|
-
* @
|
|
170
|
-
*
|
|
201
|
+
* @param page - The Playwright page object
|
|
202
|
+
* @param text - The text to search for
|
|
203
|
+
* @param table - Optional table data for click options
|
|
204
|
+
* @example When I double click on text "Button"
|
|
171
205
|
*/
|
|
172
206
|
async function doubleClickByText(page, text, table) {
|
|
173
207
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -175,10 +209,23 @@ async function doubleClickByText(page, text, table) {
|
|
|
175
209
|
await element.dblclick(options);
|
|
176
210
|
console.log(`🖱️ Double-clicked on text "${text}"`);
|
|
177
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Double-clicks on the first element containing the EXACT specified text.
|
|
214
|
+
* @example When I double click on exact text "Button"
|
|
215
|
+
*/
|
|
216
|
+
async function doubleClickByExactText(page, exactText, table) {
|
|
217
|
+
const options = (0, state_1.parseClickOptions)(table);
|
|
218
|
+
const element = page.getByText(exactText, { exact: true });
|
|
219
|
+
await element.dblclick(options);
|
|
220
|
+
console.log(`🖱️ Double-clicked on exact text "${exactText}"`);
|
|
221
|
+
}
|
|
178
222
|
/**
|
|
179
223
|
* Double-clicks at specific X, Y coordinates on the page.
|
|
180
|
-
* @
|
|
181
|
-
*
|
|
224
|
+
* @param page - The Playwright page object
|
|
225
|
+
* @param x - The X coordinate
|
|
226
|
+
* @param y - The Y coordinate
|
|
227
|
+
* @param table - Optional table data for click options
|
|
228
|
+
* @example When I double click position 100 200
|
|
182
229
|
*/
|
|
183
230
|
async function doubleClickPosition(page, x, y, table) {
|
|
184
231
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -187,8 +234,9 @@ async function doubleClickPosition(page, x, y, table) {
|
|
|
187
234
|
}
|
|
188
235
|
/**
|
|
189
236
|
* Right-clicks (Context Click) on the currently stored element.
|
|
190
|
-
* @
|
|
191
|
-
*
|
|
237
|
+
* @param page - The Playwright page object
|
|
238
|
+
* @param table - Optional table data for click options
|
|
239
|
+
* @example When I right click
|
|
192
240
|
*/
|
|
193
241
|
async function rightClickStoredElement(page, table) {
|
|
194
242
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -198,8 +246,10 @@ async function rightClickStoredElement(page, table) {
|
|
|
198
246
|
}
|
|
199
247
|
/**
|
|
200
248
|
* Right-clicks on the first element containing the specified text.
|
|
201
|
-
* @
|
|
202
|
-
*
|
|
249
|
+
* @param page - The Playwright page object
|
|
250
|
+
* @param text - The text to search for
|
|
251
|
+
* @param table - Optional table data for click options
|
|
252
|
+
* @example When I right click on text "Menu"
|
|
203
253
|
*/
|
|
204
254
|
async function rightClickByText(page, text, table) {
|
|
205
255
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -209,8 +259,11 @@ async function rightClickByText(page, text, table) {
|
|
|
209
259
|
}
|
|
210
260
|
/**
|
|
211
261
|
* Right-clicks at specific X, Y coordinates on the page.
|
|
212
|
-
* @
|
|
213
|
-
*
|
|
262
|
+
* @param page - The Playwright page object
|
|
263
|
+
* @param x - The X coordinate
|
|
264
|
+
* @param y - The Y coordinate
|
|
265
|
+
* @param table - Optional table data for click options
|
|
266
|
+
* @example When I right click position 100 200
|
|
214
267
|
*/
|
|
215
268
|
async function rightClickPosition(page, x, y, table) {
|
|
216
269
|
const options = (0, state_1.parseClickOptions)(table);
|
|
@@ -220,9 +273,12 @@ async function rightClickPosition(page, x, y, table) {
|
|
|
220
273
|
/**
|
|
221
274
|
* Clicks on the Nth element containing the specified text.
|
|
222
275
|
* Handles 1st, 2nd, 3rd, 4th, etc.
|
|
223
|
-
* @
|
|
224
|
-
*
|
|
225
|
-
*
|
|
276
|
+
* @param page - The Playwright page object
|
|
277
|
+
* @param indexStr - The index string (1st, 2nd, 3rd, etc.)
|
|
278
|
+
* @param text - The text to search for
|
|
279
|
+
* @param table - Optional table data for click options
|
|
280
|
+
* @example When I click on 1st element "Login"
|
|
281
|
+
* When I click on 2nd element "Submit"
|
|
226
282
|
*/
|
|
227
283
|
async function clickNthElementByText(page, indexStr, text, table) {
|
|
228
284
|
const index = parseInt(indexStr, 10);
|
|
@@ -236,35 +292,116 @@ async function clickNthElementByText(page, indexStr, text, table) {
|
|
|
236
292
|
}
|
|
237
293
|
/**
|
|
238
294
|
* Clicks on the Nth element matching a CSS or XPath selector.
|
|
239
|
-
* @
|
|
240
|
-
*
|
|
295
|
+
* @param page - The Playwright page object
|
|
296
|
+
* @param indexStr - The index string (1st, 2nd, 3rd, etc.)
|
|
297
|
+
* @param selectorKey - The selector key (can be a fixture key or raw CSS/XPath selector)
|
|
298
|
+
* @param table - Optional table data for click options
|
|
299
|
+
* @example When I click on 1st selector ".btn"
|
|
241
300
|
*/
|
|
242
|
-
async function clickNthElementBySelector(page, indexStr,
|
|
301
|
+
async function clickNthElementBySelector(page, indexStr, selectorKey, table) {
|
|
243
302
|
const index = parseInt(indexStr, 10);
|
|
244
303
|
const options = (0, state_1.parseClickOptions)(table);
|
|
304
|
+
// Resolve selector from fixtures or use raw value
|
|
305
|
+
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
306
|
+
const selector = (0, fixtures_1.getFixtureValue)(selectors, selectorKey);
|
|
245
307
|
const locator = page.locator(selector).nth(index - 1);
|
|
246
308
|
await locator.waitFor({ state: "visible", timeout: options.timeout || 5000 });
|
|
247
309
|
await locator.click(options);
|
|
248
310
|
(0, state_1.setActiveElement)(page, locator);
|
|
249
311
|
console.log(`🖱️ Clicked on ${indexStr} selector "${selector}"`);
|
|
250
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* Clicks on a specific column in a specific row of a table.
|
|
315
|
+
* @param page - The Playwright page object
|
|
316
|
+
* @param columnIndex - The 1-based index of the column to click (1st, 2nd, 3rd, etc.)
|
|
317
|
+
* @param rowIndex - The selector key for the row (can be a fixture key or raw CSS selector)
|
|
318
|
+
* @param table - Optional table data for click options
|
|
319
|
+
* @example And I click on column 1 in row 1
|
|
320
|
+
* @example And I click on column 2 in row 3
|
|
321
|
+
* @example And I click on column 3 in row 2
|
|
322
|
+
* @example And I click on column 4 in row 5
|
|
323
|
+
*/
|
|
324
|
+
async function clickOnColumnInRow(page, columnIndex, rowIndex, table) {
|
|
325
|
+
const options = (0, state_1.parseClickOptions)(table);
|
|
326
|
+
// Adjust for 0-based indexing
|
|
327
|
+
const adjustedRowIndex = rowIndex - 1;
|
|
328
|
+
const adjustedColumnIndex = columnIndex - 1;
|
|
329
|
+
// Assuming standard table structure: table > tbody > tr > td/th
|
|
330
|
+
const cellLocator = page.locator(`tbody tr:nth-child(${adjustedRowIndex + 1}) td:nth-child(${adjustedColumnIndex + 1}), tbody tr:nth-child(${adjustedRowIndex + 1}) th:nth-child(${adjustedColumnIndex + 1})`);
|
|
331
|
+
await cellLocator.waitFor({ state: "visible", timeout: options.timeout || 5000 });
|
|
332
|
+
await cellLocator.click(options);
|
|
333
|
+
(0, state_1.setActiveElement)(page, cellLocator);
|
|
334
|
+
console.log(`🖱️ Clicked on column ${columnIndex} in row ${rowIndex}`);
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Clicks on a specific column in a row identified by a selector.
|
|
338
|
+
* @param page - The Playwright page object
|
|
339
|
+
* @param columnIndex - The 1-based index of the column to click
|
|
340
|
+
* @param rowSelectorKey - The selector key for the row (can be a fixture key or raw CSS selector)
|
|
341
|
+
* @param table - Optional table data for click options
|
|
342
|
+
* @example When I click on 1st column in row "table#users tbody tr:first-child"
|
|
343
|
+
* @example When I click on 2nd column in row "tr.user-row"
|
|
344
|
+
* @example When I click on 3rd column in row ".data-table tbody tr:last-child"
|
|
345
|
+
* @example When I click on 4th column in row "tr[data-id='123']"
|
|
346
|
+
*/
|
|
347
|
+
async function clickOnNthColumnInRow(page, columnIndex, rowSelectorKey, table) {
|
|
348
|
+
const options = (0, state_1.parseClickOptions)(table);
|
|
349
|
+
// Resolve selector from fixtures or use raw value
|
|
350
|
+
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
351
|
+
const rowSelector = (0, fixtures_1.getFixtureValue)(selectors, rowSelectorKey);
|
|
352
|
+
// Adjust for 0-based indexing
|
|
353
|
+
const adjustedColumnIndex = columnIndex - 1;
|
|
354
|
+
// Find the specific row and then the nth column within that row
|
|
355
|
+
const rowLocator = page.locator(rowSelector);
|
|
356
|
+
const cellLocator = rowLocator.locator(`td:nth-child(${adjustedColumnIndex + 1}), th:nth-child(${adjustedColumnIndex + 1})`);
|
|
357
|
+
await cellLocator.waitFor({ state: "visible", timeout: options.timeout || 5000 });
|
|
358
|
+
await cellLocator.click(options);
|
|
359
|
+
(0, state_1.setActiveElement)(page, cellLocator);
|
|
360
|
+
console.log(`🖱️ Clicked on ${columnIndex}${getOrdinalSuffix(columnIndex)} column in row "${rowSelector}"`);
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Helper function to get the ordinal suffix (st, nd, rd, th) for a number
|
|
364
|
+
*/
|
|
365
|
+
function getOrdinalSuffix(num) {
|
|
366
|
+
if (num > 3 && num < 21)
|
|
367
|
+
return 'th';
|
|
368
|
+
switch (num % 10) {
|
|
369
|
+
case 1: return 'st';
|
|
370
|
+
case 2: return 'nd';
|
|
371
|
+
case 3: return 'rd';
|
|
372
|
+
default: return 'th';
|
|
373
|
+
}
|
|
374
|
+
}
|
|
251
375
|
// ==================================================
|
|
252
376
|
// GLUE STEPS
|
|
253
377
|
// ==================================================
|
|
254
|
-
(0, registry_1.Step)("I click", clickStoredElement);
|
|
255
|
-
(0, registry_1.Step)("I click on element {string}", clickElementBySelector);
|
|
256
|
-
(0, registry_1.Step)("I click on button {string}", clickButtonByLabel);
|
|
257
|
-
(0, registry_1.Step)("I click on
|
|
258
|
-
(0, registry_1.Step)("I click on
|
|
259
|
-
(0, registry_1.Step)("I click on
|
|
260
|
-
(0, registry_1.Step)("I click on
|
|
261
|
-
(0, registry_1.Step)(
|
|
262
|
-
(0, registry_1.Step)("I click
|
|
263
|
-
(0, registry_1.Step)("I
|
|
264
|
-
(0, registry_1.Step)("I double click
|
|
265
|
-
(0, registry_1.Step)("I double click
|
|
266
|
-
(0, registry_1.Step)("I
|
|
267
|
-
(0, registry_1.Step)("I
|
|
268
|
-
(0, registry_1.Step)("I right click
|
|
269
|
-
(0, registry_1.Step)(
|
|
270
|
-
(0, registry_1.Step)(
|
|
378
|
+
(0, registry_1.Step)("I click", clickStoredElement, "When");
|
|
379
|
+
(0, registry_1.Step)("I click on element {string}", clickElementBySelector, "When");
|
|
380
|
+
(0, registry_1.Step)("I click on button {string}", clickButtonByLabel, "When");
|
|
381
|
+
(0, registry_1.Step)("I click on exact button text {string}", clickButtonByExactText, "When");
|
|
382
|
+
(0, registry_1.Step)("I click on link {string}", clickLinkByText, "When");
|
|
383
|
+
(0, registry_1.Step)("I click on label {string}", clickLabelByText, "When");
|
|
384
|
+
(0, registry_1.Step)("I click on text {string}", clickByText, "When");
|
|
385
|
+
(0, registry_1.Step)("I click on exact text {string}", clickByExactText, "When");
|
|
386
|
+
(0, registry_1.Step)("I click on selector {string}", clickByRegexSelector, "When");
|
|
387
|
+
(0, registry_1.Step)("I click all", clickAllStoredElements, "When");
|
|
388
|
+
(0, registry_1.Step)("I double click", doubleClickStoredElement, "When");
|
|
389
|
+
(0, registry_1.Step)("I double click on text {string}", doubleClickByText, "When");
|
|
390
|
+
(0, registry_1.Step)("I double click on exact text {string}", doubleClickByExactText, "When");
|
|
391
|
+
(0, registry_1.Step)("I double click position {int} {int}", doubleClickPosition, "When");
|
|
392
|
+
(0, registry_1.Step)("I right click", rightClickStoredElement, "When");
|
|
393
|
+
(0, registry_1.Step)("I right click on text {string}", rightClickByText, "When");
|
|
394
|
+
(0, registry_1.Step)("I right click position {int} {int}", rightClickPosition, "When");
|
|
395
|
+
(0, registry_1.Step)("I click on {int}st element {string}", clickNthElementByText, "When");
|
|
396
|
+
(0, registry_1.Step)("I click on {int}nd element {string}", clickNthElementByText, "When");
|
|
397
|
+
(0, registry_1.Step)("I click on {int}rd element {string}", clickNthElementByText, "When");
|
|
398
|
+
(0, registry_1.Step)("I click on {int}th element {string}", clickNthElementByText, "When");
|
|
399
|
+
(0, registry_1.Step)("I click on {int}st selector {string}", clickNthElementBySelector, "When");
|
|
400
|
+
(0, registry_1.Step)("I click on {int}nd selector {string}", clickNthElementBySelector, "When");
|
|
401
|
+
(0, registry_1.Step)("I click on {int}rd selector {string}", clickNthElementBySelector, "When");
|
|
402
|
+
(0, registry_1.Step)("I click on {int}th selector {string}", clickNthElementBySelector, "When");
|
|
403
|
+
(0, registry_1.Step)("I click on column {int} in row {int}", clickOnColumnInRow, "And");
|
|
404
|
+
(0, registry_1.Step)("I click on {int}st column in row {string}", clickOnNthColumnInRow, "When");
|
|
405
|
+
(0, registry_1.Step)("I click on {int}nd column in row {string}", clickOnNthColumnInRow, "When");
|
|
406
|
+
(0, registry_1.Step)("I click on {int}rd column in row {string}", clickOnNthColumnInRow, "When");
|
|
407
|
+
(0, registry_1.Step)("I click on {int}th column in row {string}", clickOnNthColumnInRow, "When");
|