mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Improve save_screenshot documentation
This commit is contained in:
parent
2b030c7c3e
commit
502aa85d4a
1 changed files with 6 additions and 8 deletions
14
README.md
14
README.md
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue