fix text-selection to exists feature; ignore javascript popups
This commit is contained in:
17
ChangeLog
17
ChangeLog
@@ -1,3 +1,20 @@
|
||||
2016-05-05 09:58
|
||||
|
||||
* build-in-docker.sh: fixed build
|
||||
|
||||
2016-05-05 09:48
|
||||
|
||||
* build-in-docker.sh: fixed build
|
||||
|
||||
2016-05-05 09:23
|
||||
|
||||
* debian/control.in: xvfb is not required
|
||||
|
||||
2016-05-05 09:12
|
||||
|
||||
* ChangeLog, ax_init_standard_project.m4, bootstrap.sh,
|
||||
build-in-docker.sh: update build system
|
||||
|
||||
2016-05-03 06:52
|
||||
|
||||
* src/commands.hxx: some smaller fixes and improvements for joomla
|
||||
|
@@ -352,14 +352,16 @@ class TestGUI: public QMainWindow, protected Ui::TestGUI {
|
||||
// is important, but the text that will be typed
|
||||
_typing = true;
|
||||
} else {
|
||||
if (_web->page()->selectedText() != "")
|
||||
if (_web->page()->selectedText() != "") {
|
||||
// user has selected a text, append a check
|
||||
appendCommand("expect "+map(selected)
|
||||
appendCommand("exists "+map(selected)
|
||||
+" -> "+_web->page()->selectedText());
|
||||
else
|
||||
_web->page()->findText(QString());
|
||||
} else {
|
||||
// user has clicked without selection, append a click
|
||||
appendCommand("click "+map(selected));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
appendCommand("# click, but where?");
|
||||
}
|
||||
|
@@ -68,6 +68,44 @@ class TestWebPage: public QWebPage {
|
||||
return filename;
|
||||
}
|
||||
}
|
||||
virtual void javaScriptAlert(QWebFrame* frame, const QString& msg) {
|
||||
LOG("javaScriptAlert: "+msg);
|
||||
if (_unattended) {
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
//return QWebPage::javaScriptAlert(frame, msg);
|
||||
}
|
||||
}
|
||||
virtual bool javaScriptConfirm(QWebFrame* frame, const QString& msg) {
|
||||
LOG("javaScriptConfirm "+msg);
|
||||
if (_unattended) {
|
||||
return true;
|
||||
} else {
|
||||
return true;
|
||||
//return QWebPage::javaScriptConfirm(frame, msg);
|
||||
}
|
||||
}
|
||||
virtual void javaScriptConsoleMessage(const QString& msg,
|
||||
int line, const QString& src) {
|
||||
LOG("javaScriptConsoleMessage: "+msg);
|
||||
if (_unattended) {
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
//return QWebPage::javaScriptConsoleMessage(msg, line, src);
|
||||
}
|
||||
}
|
||||
virtual bool javaScriptPrompt(QWebFrame* frame, const QString& msg,
|
||||
const QString& defaultValue, QString* result) {
|
||||
LOG("javaScriptPrompt: "+msg);
|
||||
if (_unattended) {
|
||||
return true;
|
||||
} else {
|
||||
return true;
|
||||
//return QWebPage::javaScriptPrompt(frame, msg, defaultValue, result);
|
||||
}
|
||||
}
|
||||
private:
|
||||
bool _unattended;
|
||||
QString _nextFile;
|
||||
|
Reference in New Issue
Block a user