README.md in poltergeist-1.10.0 vs README.md in poltergeist-1.11.0
- old
+ new
@@ -1,17 +1,17 @@
# Poltergeist - A PhantomJS driver for Capybara #
-[![Build Status](https://secure.travis-ci.org/teampoltergeist/poltergeist.png)](http://travis-ci.org/teampoltergeist/poltergeist)
+[![Build Status](https://secure.travis-ci.org/teampoltergeist/poltergeist.svg)](http://travis-ci.org/teampoltergeist/poltergeist)
Poltergeist is a driver for [Capybara](https://github.com/jnicklas/capybara). It allows you to
run your Capybara tests on a headless [WebKit](http://webkit.org) browser,
provided by [PhantomJS](http://phantomjs.org/).
**If you're viewing this at https://github.com/teampoltergeist/poltergeist,
you're reading the documentation for the master branch.
[View documentation for the latest release
-(1.9.0).](https://github.com/teampoltergeist/poltergeist/tree/v1.9.0)**
+(1.10.0).](https://github.com/teampoltergeist/poltergeist/tree/v1.10.0)**
## Getting help ##
Questions should be posted [on Stack
Overflow, using the 'poltergeist' tag](http://stackoverflow.com/questions/tagged/poltergeist).
@@ -107,11 +107,11 @@
* `page.response_headers`
* `page.save_screenshot`
* `page.driver.render_base64(format, options)`
* `page.driver.scroll_to(left, top)`
* `page.driver.basic_authorize(user, password)`
-* `element.native.send_keys(*keys)`
+* `element.send_keys(*keys)`
* `page.driver.set_proxy(ip, port, type, user, password)`
* window API
* cookie handling
* drag-and-drop
@@ -128,11 +128,11 @@
By default, only the viewport will be rendered (the part of the page that is in
view). To render the entire page, use `save_screenshot('/path/to/file.png',
:full => true)`.
You also have an ability to render selected element. Pass option `selector` with
-any valid element selector to make a screenshot bounded by that element
+any valid CSS element selector to make a screenshot bounded by that element
`save_screenshot('/path/to/file.png', :selector => '#id')`.
If you need for some reasons base64 encoded screenshot you can simply call
`render_base64` that will return you encoded image. Additional options are the
same as for `save_screenshot` except the first argument which is format (:png by
@@ -224,18 +224,18 @@
There's an ability to send arbitrary keys to the element:
``` ruby
element = find('input#id')
-element.native.send_key('String')
+element.send_keys('String')
```
or even more complicated:
``` ruby
-element.native.send_keys('H', 'elo', :Left, 'l') # => 'Hello'
-element.native.send_key(:Enter) # triggers Enter key
+element.send_keys('H', 'elo', :left, 'l') # => 'Hello'
+element.send_keys(:enter) # triggers Enter key
```
Since it's implemented natively in PhantomJS this will exactly imitate user
behavior.
See more about [sendEvent](http://phantomjs.org/api/webpage/method/send-event.html) and
[PhantomJS keys](https://github.com/ariya/phantomjs/commit/cab2635e66d74b7e665c44400b8b20a8f225153a)
@@ -264,9 +264,11 @@
when communicating with PhantomJS. Default is 30.
* `:inspector` (Boolean, String) - See 'Remote Debugging', above.
* `:js_errors` (Boolean) - When false, JavaScript errors do not get re-raised in Ruby.
* `:window_size` (Array) - The dimensions of the browser window in which to test, expressed
as a 2-element array, e.g. [1024, 768]. Default: [1024, 768]
+* `:screen_size` (Array) - The dimensions the window size will be set to when Window#maximize is called. Expressed
+ as a 2-element array, e.g. [1600, 1200]. Default: [1366, 768]
* `:phantomjs_options` (Array) - Additional [command line options](http://phantomjs.org/api/command-line.html)
to be passed to PhantomJS, e.g. `['--load-images=no', '--ignore-ssl-errors=yes']`
* `:extensions` (Array) - An array of JS files to be preloaded into
the phantomjs browser. Useful for faking unsupported APIs.
* `:port` (Fixnum) - The port which should be used to communicate