Skip to content

Commit 0518ca0

Browse files
authored
Merge pull request #508 from hakonhagland/doc_click
qtbot.click() does not exist?
2 parents 2f2f757 + 9839728 commit 0518ca0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pytestqt/qtbot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,9 @@ def captureExceptions(self):
603603
.. code-block:: python
604604
605605
with qtbot.capture_exceptions() as exceptions:
606-
qtbot.click(button)
606+
qtbot.mouseClick(
607+
button, QtCore.MouseButton.LeftButton # for PyQt6
608+
) # ... or QtCore.LeftButton in PyQt5
607609
608610
# exception is a list of sys.exc_info tuples
609611
assert len(exceptions) == 1

0 commit comments

Comments
 (0)