Skip to content
This repository
Newer
Older
100644 86 lines (76 sloc) 2.93 kb
efa577c3 »
2012-03-26 First pass at within_window support
1 #ifndef _WEBPAGE_H
2 #define _WEBPAGE_H
0745b1ee »
2011-02-18 Initial commit
3 #include <QtWebKit>
4
82f84fbd »
2012-03-28 WebPageManager is no longer a singleton
5 class WebPageManager;
6
0745b1ee »
2011-02-18 Initial commit
7 class WebPage : public QWebPage {
8 Q_OBJECT
9
10 public:
82f84fbd »
2012-03-28 WebPageManager is no longer a singleton
11 WebPage(WebPageManager *, QObject *parent = 0);
d9b18985 »
2012-06-29 Command to enable a more useful debug log
12 QVariant invokeCapybaraFunction(const char *name, const QStringList &arguments);
13 QVariant invokeCapybaraFunction(QString &name, const QStringList &arguments);
a8e64a5f »
2011-03-09 Don't create a command until all arguments are received; don't start …
14 QString failureString();
ee1388e3 »
2011-06-08 add header support
15 QString userAgentForUrl(const QUrl &url ) const;
818f654e »
2011-06-25 fix spell
16 void setUserAgent(QString userAgent);
e677cb9c »
2012-07-10 Control JavaScript confirmation dialogs from Ruby
17 void setConfirmAction(QString action);
18 void setPromptAction(QString action);
19 void setPromptText(QString action);
558c58ba »
2011-08-12 Status codes
20 int getLastStatus();
5ce60584 »
2011-08-24 reset status code
21 void setCustomNetworkAccessManager();
17873240 »
2011-05-26 Adding ability to render webpage to a PNG
22 bool render(const QString &fileName);
0c8e347b »
2011-07-20 support attaching file to HTML5 input with multiple attribute
23 virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);
646eabc6 »
2012-03-30 Add option to disable image loading in WebKit.
24 void setSkipImageLoading(bool skip);
62b49914 »
2011-10-31 Add ability to query for console messages & errors
25 QString consoleMessages();
e677cb9c »
2012-07-10 Control JavaScript confirmation dialogs from Ruby
26 QString alertMessages();
27 QString confirmMessages();
28 QString promptMessages();
1a609a94 »
2012-03-29 Set the window to the default size on #reset!
29 void resetWindowSize();
efa577c3 »
2012-03-26 First pass at within_window support
30 QWebPage *createWindow(WebWindowType type);
fe46eaf5 »
2012-03-27 Implement window_handles and window_handle for proper window switching
31 QString uuid();
aaba4d12 »
2012-03-28 Find window by name, title or URL
32 QString getWindowName();
33bc195f »
2012-03-28 Move window selection logic into WebPage
33 bool matchesWindowSelector(QString);
f80125e6 »
2012-04-04 Pass the WebPageManager to each command
34 void setFocus();
0745b1ee »
2011-02-18 Initial commit
35
36 public slots:
37 bool shouldInterruptJavaScript();
54d7df3c »
2011-02-25 Moved Javascript code into a .js file that gets loaded into each page
38 void injectJavascriptHelpers();
a8e64a5f »
2011-03-09 Don't create a command until all arguments are received; don't start …
39 void loadStarted();
40 void loadFinished(bool);
41 bool isLoading() const;
7b3d1427 »
2011-08-19 Response headers supported.
42 QString pageHeaders();
182cb2e5 »
2011-04-19 Working on frame handling. In terms of the QT code, the non-frame-rel…
43 void frameCreated(QWebFrame *);
4ca10d29 »
2012-05-04 Switch ignore ssl from a command-line flag to a server command
44 void handleSslErrorsForReply(QNetworkReply *reply, const QList<QSslError> &);
353fe860 »
2011-09-15 Handle unsupported content types gracefully
45 void handleUnsupportedContent(QNetworkReply *reply);
784b9b7f »
2012-06-29 Setup multi-window sync.
46 void networkAccessManagerCreatedRequest(QNetworkReply *reply);
47 void networkAccessManagerFinishedReply(QNetworkReply *reply);
353fe860 »
2011-09-15 Handle unsupported content types gracefully
48
49 signals:
50 void pageFinished(bool);
784b9b7f »
2012-06-29 Setup multi-window sync.
51 void requestCreated(QNetworkReply *reply);
52 void replyFinished(QNetworkReply *reply);
54d7df3c »
2011-02-25 Moved Javascript code into a .js file that gets loaded into each page
53
13426ba4 »
2011-02-26 Implement Driver#evaluateScript
54 protected:
55 virtual void javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID);
30d90f9f »
2011-03-11 Fixed alert/confirm/prompt crashing the page
56 virtual void javaScriptAlert(QWebFrame *frame, const QString &message);
57 virtual bool javaScriptConfirm(QWebFrame *frame, const QString &message);
58 virtual bool javaScriptPrompt(QWebFrame *frame, const QString &message, const QString &defaultValue, QString *result);
a4490083 »
2011-07-18 allow uploading files with forms
59 virtual QString chooseFile(QWebFrame * parentFrame, const QString &suggestedFile);
18655cb4 »
2012-04-03 Add error message detail for page load failure.
60 virtual bool supportsExtension(Extension extension) const;
13426ba4 »
2011-02-26 Implement Driver#evaluateScript
61
54d7df3c »
2011-02-25 Moved Javascript code into a .js file that gets loaded into each page
62 private:
63 QString m_capybaraJavascript;
818f654e »
2011-06-25 fix spell
64 QString m_userAgent;
a8e64a5f »
2011-03-09 Don't create a command until all arguments are received; don't start …
65 bool m_loading;
d8020ce3 »
2012-07-10 Treat fewer responses as fatal failures
66 bool m_failed;
0c8e347b »
2011-07-20 support attaching file to HTML5 input with multiple attribute
67 QString getLastAttachedFileName();
d3b9b304 »
2011-08-12 Extract method
68 void loadJavascript();
82ae0c29 »
2011-08-12 Override custom fonts, since some of them crash QtWebkit on OS X
69 void setUserStylesheet();
48271748 »
2011-08-26 Response headers should be reset
70 int m_lastStatus;
7b3d1427 »
2011-08-19 Response headers supported.
71 QString m_pageHeaders;
e677cb9c »
2012-07-10 Control JavaScript confirmation dialogs from Ruby
72 bool m_confirm;
73 bool m_prompt;
62b49914 »
2011-10-31 Add ability to query for console messages & errors
74 QStringList m_consoleMessages;
e677cb9c »
2012-07-10 Control JavaScript confirmation dialogs from Ruby
75 QStringList m_alertMessages;
76 QStringList m_confirmMessages;
77 QString m_prompt_text;
78 QStringList m_promptMessages;
fe46eaf5 »
2012-03-27 Implement window_handles and window_handle for proper window switching
79 QString m_uuid;
82f84fbd »
2012-03-28 WebPageManager is no longer a singleton
80 WebPageManager *m_manager;
18655cb4 »
2012-04-03 Add error message detail for page load failure.
81 QString m_errorPageMessage;
0745b1ee »
2011-02-18 Initial commit
82 };
83
efa577c3 »
2012-03-26 First pass at within_window support
84 #endif //_WEBPAGE_H
85
Something went wrong with that request. Please try again.