Sha256: 2ffb465f1a7e2f0734dbe3f5ce2aae419fc06c8aec8ad3f3139c1a657d391bda
Contents?: true
Size: 1.96 KB
Versions: 2
Compression:
Stored size: 1.96 KB
Contents
#include <QtWebKit> class WebPage : public QWebPage { Q_OBJECT public: WebPage(QObject *parent = 0); QVariant invokeCapybaraFunction(const char *name, QStringList &arguments); QVariant invokeCapybaraFunction(QString &name, QStringList &arguments); QString failureString(); QString userAgentForUrl(const QUrl &url ) const; void setUserAgent(QString userAgent); int getLastStatus(); void resetResponseHeaders(); void setCustomNetworkAccessManager(); bool render(const QString &fileName); virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0); void ignoreSslErrors(); QString consoleMessages(); void resetConsoleMessages(); void resetWindowSize(); public slots: bool shouldInterruptJavaScript(); void injectJavascriptHelpers(); void loadStarted(); void loadFinished(bool); bool isLoading() const; QString pageHeaders(); void frameCreated(QWebFrame *); void replyFinished(QNetworkReply *reply); void handleSslErrorsForReply(QNetworkReply *reply, const QList<QSslError> &); void handleUnsupportedContent(QNetworkReply *reply); signals: void pageFinished(bool); protected: virtual void javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID); virtual void javaScriptAlert(QWebFrame *frame, const QString &message); virtual bool javaScriptConfirm(QWebFrame *frame, const QString &message); virtual bool javaScriptPrompt(QWebFrame *frame, const QString &message, const QString &defaultValue, QString *result); virtual QString chooseFile(QWebFrame * parentFrame, const QString &suggestedFile); private: QString m_capybaraJavascript; QString m_userAgent; bool m_loading; QString getLastAttachedFileName(); void loadJavascript(); void setUserStylesheet(); int m_lastStatus; QString m_pageHeaders; bool m_ignoreSslErrors; QStringList m_consoleMessages; };
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capybara-webkit-0.12.1 | src/WebPage.h |
capybara-webkit-0.12.0 | src/WebPage.h |