|
|
@ -352,13 +352,15 @@ class TestGUI: public QMainWindow, protected Ui::TestGUI { |
|
|
|
// is important, but the text that will be typed
|
|
|
|
// is important, but the text that will be typed
|
|
|
|
_typing = true; |
|
|
|
_typing = true; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (_web->page()->selectedText() != "") |
|
|
|
if (_web->page()->selectedText() != "") { |
|
|
|
// user has selected a text, append a check
|
|
|
|
// user has selected a text, append a check
|
|
|
|
appendCommand("expect "+map(selected) |
|
|
|
appendCommand("exists "+map(selected) |
|
|
|
+" -> "+_web->page()->selectedText()); |
|
|
|
+" -> "+_web->page()->selectedText()); |
|
|
|
else |
|
|
|
_web->page()->findText(QString()); |
|
|
|
|
|
|
|
} else { |
|
|
|
// user has clicked without selection, append a click
|
|
|
|
// user has clicked without selection, append a click
|
|
|
|
appendCommand("click "+map(selected)); |
|
|
|
appendCommand("click "+map(selected)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
appendCommand("# click, but where?"); |
|
|
|
appendCommand("# click, but where?"); |
|
|
|