2011-02-26 04:39:29 +00:00
|
|
|
#include "Node.h"
|
|
|
|
#include "WebPage.h"
|
|
|
|
|
|
|
|
Node::Node(WebPage *page, QObject *parent) : Command(page, parent) {
|
|
|
|
}
|
|
|
|
|
|
|
|
void Node::start(QStringList &arguments) {
|
|
|
|
QStringList functionArguments(arguments);
|
|
|
|
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
|
|
|
}
|
|
|
|
|