Skip to content

Commit 9839728

Browse files
committed
qtbot.click() does not exist
Remove reference to qtbot.click() in the documentation, and replace with qtbot.mouseClick()
1 parent 2f2f757 commit 9839728

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)