1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index 5366748..5fc01b8 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml
@@ -1056,6 +1056,10 @@ Item {
modifiers = Qt.NoModifier
if (delay == undefined)
delay = -1
+ if (!item)
+ fail("No item to click")
+ if (!item.visible)
+ fail("item to click is not visible")
if (!qtest_events.mouseClick(item, x, y, button, modifiers, delay))
qtest_fail("window not shown", 2)
}
|