mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
14 lines
436 B
C++
14 lines
436 B
C++
#include "Evaluate.h"
|
|
#include "WebPage.h"
|
|
#include "WebPageManager.h"
|
|
#include "JsonSerializer.h"
|
|
#include <iostream>
|
|
|
|
Evaluate::Evaluate(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
|
|
}
|
|
|
|
void Evaluate::start() {
|
|
QVariant result = page()->currentFrame()->evaluateJavaScript(arguments()[0]);
|
|
JsonSerializer serializer;
|
|
finish(true, serializer.serialize(result));
|
|
}
|