Commit Graph

31 Commits

Author SHA1 Message Date
Joe Ferris e0172bfcd9 Update for Capybara 2.3.0
This adds support for the full Capybara 2.3.0 API. There are two known
incompatibilities:

* Selenium supports outerWidth and outerHeight, which we cannot, because we
  dont' have an actual OS window.
* Selenium raises errors after interacting with a closed window. We focus the
  next available window after closing.

This commit adds the following:

* Implement Driver#close_window
* Implement Driver#current_window_handle
* Implement Driver#maximize_window
* Implement Driver#open_new_window
* Implement Driver#no_such_window_error
* Implement Driver#resize_window_to
* Implement Driver#switch_to_window
* Implement Driver#window_size
* Implement Driver#go_back
* Implement Driver#go_forward
* Support change events when clearing a text input
* Support setting contentEditable elements
* Support window.close() in JavaScript
* Don't return text from hidden elements
* Skip Capybara specs which use outerWidth, outerHeight
* Don't use Qt object ownership to manage windows
2014-07-01 20:36:42 -04:00
David Tengdin and Matthew Horan 60a8300821 Rename Find command to FindXpath 2013-02-26 15:19:18 -05:00
David Tengdin and Matthew Horan 10c6ee93d1 Remove duplication from Javascript error handling 2013-02-25 21:24:22 -05:00
David Tengdin and Matthew Horan cfe1e57884 Implement Driver#find_css and Node#find_css 2013-02-25 21:24:22 -05:00
Matthew Horan fda0894f76 Implement Browser#title 2013-02-18 20:52:32 -05:00
Joe Ferris c47f0a12b3 Add Driver#version to print version info
* Prints version of major components
* Includes capybara, capybara-webkit, Qt, WebKit, QtWebKit
* Useful for debugging available features
2013-02-07 10:29:53 -05:00
Matthew Horan 7ace6dce54 Remove the Source command 2012-11-30 21:38:56 -05:00
Matthew Horan e983c63008 Remove RequestedUrl command 2012-11-30 21:38:56 -05:00
Matthew Horan 14a38088e7 Remove Url command 2012-11-30 21:38:56 -05:00
Sean Geoghegan f755b1f277 Add blacklisting support to webkit server.
Adds a SetBlacklist command that takes a list of URLs
which will be black listed by the WebKit Server. When
a request is made to one these URLs webkit_server will
intercept the request and return a NoOpReply which contains
no content.
2012-11-15 10:32:06 -05:00
Matthew Horan cbb58d05f1 Revert "Revert "Add configurable timeouts to commands.""
This reverts commit b1b3a4c390.
2012-10-24 07:55:29 -04:00
Matthew Horan b1b3a4c390 Revert "Add configurable timeouts to commands."
This reverts commit da93136a9c.

Conflicts:
	src/TimeoutCommand.cpp
2012-10-23 23:24:42 -04:00
Sean Geoghegan da93136a9c Add configurable timeouts to commands.
Timeouts can be set using browser.timeout = <seconds>.
When a command or page load takes longer the specified
timeout a Capybara::TimeoutError will be raised. Calls
to reset! will reset the timeout. You can also clear
the timeout by setting it to -1.

The timeout is implemented as a Command decorator.
2012-07-18 20:27:44 -07:00
Dan Ivovich e677cb9c8e Control JavaScript confirmation dialogs from Ruby
Adds #alert_messages, #confirm_messages, #prompt_messages,
 #accept_js_confirms!, #dismiss_js_confirms, #accept_js_prompts!,
 #dismiss_js_prompts, and #js_prompt_input= .
2012-07-13 10:12:49 -07:00
Joe Ferris 95732ad796 Split Command into more abstract Command and concrete SocketCommand 2012-07-08 12:04:30 -07:00
Joe Ferris d9b18985e1 Command to enable a more useful debug log 2012-07-08 09:01:26 -07:00
Matthew Mongeau 5b5067f243 Added browser.authenticate for http basic authentication 2012-06-15 12:49:02 -04:00
Matthew Horan f80125e6cb Pass the WebPageManager to each command 2012-05-29 22:23:02 -04:00
Matthew Horan 82f84fbde1 WebPageManager is no longer a singleton 2012-05-29 22:23:02 -04:00
Matthew Horan fe46eaf50d Implement window_handles and window_handle for proper window switching 2012-05-29 22:20:10 -04:00
Matthew Horan efa577c3f0 First pass at within_window support 2012-05-25 21:09:41 -04:00
Sean Geoghegan 646eabc68d Add option to disable image loading in WebKit. 2012-05-11 14:17:00 -04:00
Joe Ferris 4ca10d29ed Switch ignore ssl from a command-line flag to a server command 2012-05-04 16:00:25 -04:00
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 354180acb5 CommandFactory handles unknown commands by returning a NullCommand 2012-03-21 18:50:55 -04:00
Joe Ferris 85dcc729dd Pass command arguments to the constructor 2012-03-16 19:58:58 -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
Matthew Mongeau 93bfcf6e46 Clean up proxy interface 2011-10-14 17:37:34 -04:00
Joe Ferris b4708b2b88 Refactor Connection 2011-10-14 11:57:28 -04:00