1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00
capybara-webkit/src/GetWindowHandles.cpp

22 lines
547 B
C++
Raw Normal View History

#include "GetWindowHandles.h"
#include "WebPageManager.h"
#include "CommandFactory.h"
#include "WebPage.h"
#include "JsonSerializer.h"
#include <QStringList>
GetWindowHandles::GetWindowHandles(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
}
void GetWindowHandles::start() {
QVariantList handles;
foreach(WebPage *page, manager()->pages())
handles << page->uuid();
JsonSerializer serializer;
QByteArray json = serializer.serialize(handles);
2013-02-11 18:31:41 -05:00
finish(true, json);
}