Improve save_screenshot documentation

This commit is contained in:
Jo Liss 2012-08-02 15:15:35 +02:00
parent 2b030c7c3e
commit 502aa85d4a
1 changed files with 6 additions and 8 deletions

View File

@ -480,14 +480,6 @@ that this may break with more complicated expressions:
result = page.evaluate_script('4 + 4');
```
### Saving screenshot
In drivers which support it, you can save screenshot:
```ruby
page.save_screenshot('screenshot.png')
```
### Debugging
It can be useful to take a snapshot of the page as it currently is and take a
@ -507,6 +499,12 @@ print page.html
This is mostly useful for debugging. You should avoid testing against the
contents of `page.html` and use the more expressive finder methods instead.
Finally, in drivers that support it, you can save a screenshot:
```ruby
page.save_screenshot('screenshot.png')
```
## Transactions and database setup
Some Capybara drivers need to run against an actual HTTP server. Capybara takes