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

19 lines
542 B
C++
Raw Normal View History

#include "Authenticate.h"
#include "WebPage.h"
#include "NetworkAccessManager.h"
Authenticate::Authenticate(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
}
void Authenticate::start() {
QString username = arguments()[0];
QString password = arguments()[1];
NetworkAccessManager* networkAccessManager = page()->networkAccessManager();
networkAccessManager->setUserName(username);
networkAccessManager->setPassword(password);
emit finished(new Response(true));
}