2011-02-26 04:39:29 +00:00
|
|
|
#include "Node.h"
|
|
|
|
#include "WebPage.h"
|
|
|
|
|
2012-03-16 23:58:58 +00:00
|
|
|
Node::Node(WebPage *page, QStringList &arguments, QObject *parent) : Command(page, arguments, parent) {
|
2011-02-26 04:39:29 +00:00
|
|
|
}
|
|
|
|
|
2012-03-16 23:58:58 +00:00
|
|
|
void Node::start() {
|
|
|
|
QStringList functionArguments(arguments());
|
2011-02-26 04:39:29 +00:00
|
|
|
QString functionName = functionArguments.takeFirst();
|
|
|
|
QVariant result = page()->invokeCapybaraFunction(functionName, functionArguments);
|
|
|
|
QString attributeValue = result.toString();
|
2011-05-05 21:45:44 +00:00
|
|
|
emit finished(new Response(true, attributeValue));
|
2011-02-26 04:39:29 +00:00
|
|
|
}
|
|
|
|
|