From 3c3013b8e7de5e1f8ae57e1d4a8b672cab8f6c47 Mon Sep 17 00:00:00 2001 From: florck <florian.thoni@floth.fr> Date: Sat, 29 Apr 2017 15:14:55 +0200 Subject: [PATCH] Test helpers : Message box, click yes vs enter Instead of hitting enter, we click ont the yes button. --- tests/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/helpers.py b/tests/helpers.py index 6e340a19..709a071f 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -7,7 +7,7 @@ def click_on_top_message_box(): topWidgets = QApplication.topLevelWidgets() for w in topWidgets: if isinstance(w, QMessageBox): - QTest.keyClick(w, Qt.Key_Enter) + QTest.mouseClick(w.button(QMessageBox.Yes), Qt.LeftButton) elif isinstance(w, QDialog) and w.windowTitle() == "Registration": QTest.keyClick(w, Qt.Key_Enter) -- GitLab