diff --git a/src/commands.hxx b/src/commands.hxx index 694aae5..77e9574 100644 --- a/src/commands.hxx +++ b/src/commands.hxx @@ -123,6 +123,9 @@ class Command: public QObject { QString result() { return _result; } + virtual bool isTestcase() { + return true; + } static void realMouseClick(QWebFrame* frame, QString selector) { QWebElement element(find(frame, selector)); if (element.isNull()) throw ElementNotFound(selector); @@ -251,6 +254,9 @@ class Empty: public Command { bool execute(Script*, QWebFrame*) { return true; } + virtual bool isTestcase() { + return false; + } }; class Comment: public Command { @@ -281,6 +287,9 @@ class Comment: public Command { this->log(false); return true; } + virtual bool isTestcase() { + return false; + } private: QString _comment; }; @@ -668,7 +677,8 @@ class Script: public QObject { xmlattr(_cerr).toStdString()); _cout.clear(); _cerr.clear(); - _testsuites->last()<isTestcase()) + _testsuites->last()<last()<isTestcase()) + _testsuites->last()<line()); e.file((*cmd)->file());