You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We wait for the element to stop moving before clicking.
70
+
Playwright waits for the element to stop moving before clicking.
71
71
72
72
- Another element is temporary obscuring the target element.
73
73
@@ -93,8 +93,8 @@ These are some clicking corner cases that we did consider and decided to support
93
93
</script>
94
94
```
95
95
96
-
For example, the dialog is dismissed and is slowly fading out. We wait for the obscuring element to disappear.
97
-
More precisely, we wait for the target element to actually receive pointer events.
96
+
For example, the dialog is dismissed and is slowly fading out. Playwright waits for the obscuring element to disappear.
97
+
More precisely, it waits for the target element to actually receive pointer events.
98
98
99
99
- Element is replaced with another one after animation.
100
100
@@ -112,7 +112,7 @@ These are some clicking corner cases that we did consider and decided to support
112
112
</script>
113
113
```
114
114
115
-
We wait for the element to be at a stable position, detect that it has been removed from the DOM and retry.
115
+
Playwright waits for the element to be at a stable position, detects that it has been removed from the DOM and retries.
116
116
117
117
### Targeting
118
118
@@ -124,17 +124,15 @@ These are some clicking corner cases that we did consider and decided to support
124
124
</button>
125
125
```
126
126
127
-
We assume that in such a case the first parent receiving pointer events is a click target.
128
-
This is very convenient with something like `text=Click target` selector that actually targets the inner element.
127
+
Playwright assumes that in such a case the first parent receiving pointer events is a click target.
128
+
This is very convenient with something like `text=Click target` selector that actually targets the inner element but wants to click on the parent button.
129
129
130
130
131
131
## Unsupported click scenarios
132
132
133
-
These are some clicking corner cases that we considered.
133
+
Some scenarios here are marked as a bug in the web page - we believe that the page should be fixed because the real user will suffer the same issue. Playwright tries to throw when it's possible to detect the issue or timeout otherwise.
134
134
135
-
Some scenarios are marked as a bug in the web page - we believe that the page should be fixed because the real user will suffer the same issue. We try to throw when it's possible to detect the issue or timeout otherwise.
136
-
137
-
Other scenarios are perfectly fine, but we cannot support them, and usually suggest another way to handle. If Playwright logic does not work on your page, passing `{force: true}` option to the click will force the click without any checks. Use it when you know that's what you need.
135
+
Other scenarios are perfectly fine, but Playwright cannot support them, and we usually suggest another way to handle. If Playwright logic does not work on your page, passing `{force: true}` option to the click will force the click without any checks. Use it when you know that's what you need.
138
136
139
137
### Positioning
140
138
@@ -151,7 +149,7 @@ Other scenarios are perfectly fine, but we cannot support them, and usually sugg
151
149
</script>
152
150
```
153
151
154
-
We consider this a bug in the page and throw.
152
+
Playwright throws, considering this a bug in the page.
155
153
156
154
### Dynamic changes
157
155
@@ -165,7 +163,7 @@ Other scenarios are perfectly fine, but we cannot support them, and usually sugg
165
163
<button style="animation: 3s linear move infinite;">Click me</button>
166
164
```
167
165
168
-
We wait for the element to be at a stable position and timeout. A real user would be able to click in some cases.
166
+
Playwright waits for the element to be at a stable position and times out. A real user would be able to click in some cases.
169
167
170
168
- Element is animating in, but temporarily pauses in the middle.
171
169
@@ -176,7 +174,7 @@ Other scenarios are perfectly fine, but we cannot support them, and usually sugg
We click in the middle of the animation and could actually click at the wrong element. We do not detect this case and do not throw. A real user would probably retry and click again.
177
+
Playwright clicks in the middle of the animation and could actually click at the wrong element. Playwright does not detect this case and does not throw. A real user would probably retry and click again.
180
178
181
179
- Element is removed or hidden after `fetch` / `xhr` / `setTimeout`.
182
180
@@ -187,9 +185,9 @@ Other scenarios are perfectly fine, but we cannot support them, and usually sugg
187
185
</script>
188
186
```
189
187
190
-
We click the element and might be able to misclick. We do not detect this case and do not throw.
188
+
Playwright clicks the element, and might be able to misclick because it is already hidden. Playwright does not detect this case and does not throw.
191
189
192
-
This is a typical flaky failure, because the network fetch is racing against the input driven by Playwright. The suggested solution is to wait for the response to arrive, and only then click. For example, consider a filtered list with a "Apply filters" button that fetches new data, removes all items from the list and inserts new ones.
190
+
This is a typical flaky failure, because the network fetch is racing against the input driven by Playwright. We suggest to wait for the response to arrive, and click after that. For example, consider a filtered list with an "Apply filters" button that fetches new data, removes all items from the list and inserts new ones.
193
191
194
192
```js
195
193
await Promise.all([
@@ -215,7 +213,7 @@ Other scenarios are perfectly fine, but we cannot support them, and usually sugg
215
213
</div>
216
214
```
217
215
218
-
We consider the overlay temporary and timeout waiting for it to disappear.
216
+
Playwright considers the overlay temporary and times out while waiting for the overlay to disappear.
219
217
When the overlay element is actually handling the input instead of the target element, use `{force: true}` option to skip the checks and click anyway.
0 commit comments