Commit Graph

31 Commits

Author SHA1 Message Date
Tom Lea 04fde02ad7 Add a resize_window method to the driver.
Allow users to resize the webkit viewport via
Capybara::Driver::Webkit#resize_window(width, height).

This can be called before or after page load, and fires resize events as expected.
2012-04-03 18:54:12 -04:00
Joe Ferris 4531f65dc3 Move logic to wait for pending page loads into a decorator 2012-03-23 16:51:34 -04:00
Joe Ferris 354180acb5 CommandFactory handles unknown commands by returning a NullCommand 2012-03-21 18:50:55 -04:00
Marc Schwieterman caa86b72c4 create CurrentUrl command 2012-02-17 11:55:19 -05:00
Joe Fiorini 7f907a0099 Add command to retrieve URL modified by Javascript
If I use pushState to change the URL Browser#current_url still returns
the URL as it was after the original request. This commit adds a command
for RequestedUrl, which is the QtWebkit method for retrieving a URL
modified by Javascript or a redirect.
2012-01-13 11:02:09 -05:00
Joe Fiorini 62b49914b8 Add ability to query for console messages & errors
- This changes the format of console message output to use "|" as the
delimiter instead of ":"; ":" is no good for splitting when there are
URLs and error messages in the output
- WebPage tracks all console messages and clears them out on reset
2011-11-15 21:14:21 -05:00
Niklas Baumstark 25281b77dc add option to set an HTTP proxy 2011-10-14 17:37:34 -04:00
Joe Ferris b4708b2b88 Refactor Connection 2011-10-14 11:57:28 -04:00
Niklas Baumstark fb119f6ff8 adds cookie management functions to Webkit::Browser 2011-09-30 11:47:21 -04:00
Niklas Baumstark dc5130ce6b adapted format of webkit_server.pro to make it more version control friendly. 2011-09-30 11:47:20 -04:00
Matthew Mongeau 353fe860b2 Handle unsupported content types gracefully 2011-09-23 10:28:50 -04:00
Matthew Mongeau 7b3d142729 Response headers supported. 2011-08-19 11:57:39 -04:00
Matthew Mongeau 62b0d854df Remove debug flags 2011-08-19 11:08:26 -04:00
Joe Ferris 558c58babc Status codes 2011-08-19 10:20:28 -04:00
Matthew Mongeau 71ca80d29f wip 2011-08-19 09:59:39 -04:00
Matthew Mongeau 81ad8fd130 Implement source and body. Evaluate javascript should return nil when empty 2011-07-29 15:06:41 -04:00
Mike Nicholaides 17873240b1 Adding ability to render webpage to a PNG
The driver has a #render method which takes a destination file path and
an options hash for setting the dimensions of the browser's viewport
2011-07-03 14:10:53 -04:00
shogo-ohta ee1388e329 add header support 2011-06-24 13:55:03 +09:00
John Bintz 23ee82f7e0 simplify building on mac os x 2011-05-24 21:14:51 -04:00
Joe Ferris cc74875e4b Created a Response object for the success/message pair 2011-05-05 17:55:40 -04:00
Aaron Gibralter 182cb2e5b7 Working on frame handling. In terms of the QT code, the non-frame-related
specs pass with these changes (e.g. mainFrame() => currentFrame() and the new
injectJavascriptHelpers() code in WebPage.cpp).

It seems like the current JS+xpath implementation dives in to iframes already.
Is this desired behavior? I wonder if that works with x-domain iframes? I
doubt it...

Also, this design assumes that we only step one frame down at a time...

Lastly, I'm really not sure how QWebKit decides which frame is currentFrame().
For now, I'm hoping to be able to use the QWebFrame setFocus() method. This
may be a dead end though. We may have to have WebPage manually keep track of
the "current" frame.
2011-04-20 18:12:03 -04:00
Joe Ferris 3f519cd147 Implemented Driver#execute_script 2011-02-26 14:03:30 -05:00
Joe Ferris 13426ba4c1 Implement Driver#evaluateScript 2011-02-26 13:02:43 -05:00
Joe Ferris 52e9bee48b Merged Tristan's Url and Source commands 2011-02-26 10:06:11 -05:00
Joe Ferris 63366bf614 Implemented Node#text; refactored Node commands so that they can be easily added in Javascript 2011-02-25 23:39:29 -05:00
Joe Ferris 18d424803d Invoke Javascript functions by setting QObjects on the window object instead of string evals so that strings don't need to be escaped 2011-02-25 22:57:55 -05:00
Joe Ferris 54d7df3c4c Moved Javascript code into a .js file that gets loaded into each page 2011-02-25 22:32:22 -05:00
Tristan Dunn 003529cd9f Implement source for driver. 2011-02-25 18:04:23 -05:00
Tristan Dunn 92a17ae94e Implement current_url for driver. 2011-02-25 17:53:36 -05:00
Joe Ferris e0c4f6f57d Fetch attribute values 2011-02-25 00:15:08 -05:00
Joe Ferris 0745b1ee1c Initial commit 2011-02-24 23:13:11 -05:00