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
Copy file name to clipboardExpand all lines: docs/input.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,23 @@ Under the hood, this and other pointer-related methods:
122
122
- wait for it to receive pointer events at the action point, for example, waits until element becomes non-obscured by other elements
123
123
- retry if the element is detached during any of the above checks
124
124
125
+
#### Forcing the click
126
+
127
+
Sometimes, apps use non-trivial logic where hovering the element overlays it with another element that intercepts the click. This behavior is indistinguishable from a bug where element gets covered and the click is dispatched elsewhere. If you know this is taking place, you can bypass the actionability checks and force the click:
128
+
129
+
```js
130
+
awaitpage.click('button#submit', { force:true });
131
+
```
132
+
133
+
#### Programmatic click
134
+
135
+
If you are not interested in testing your app under the real conditions and want to simulate the click by any means possible, you can trigger the [`HTMLElement.click()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click) behavior via simply dispatching a click event on the element:
0 commit comments