forked from teamcapybara/capybara
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New API for working with windows (switching/finding/closing/opening/e…
…tc.)
- Loading branch information
Showing
23 changed files
with
1,046 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -467,6 +467,21 @@ within_table('Employee') do | |
end | ||
``` | ||
|
||
### Working with windows | ||
|
||
Capybara provides some methods to ease finding and switching windows: | ||
|
||
```ruby | ||
facebook_window = window_opened_by do | ||
click_button 'Like' | ||
end | ||
within_window facebook_window do | ||
find('#login_email').set('[email protected]') | ||
find('#login_password').set('qwerty') | ||
click_button 'Submit' | ||
end | ||
``` | ||
|
||
### Scripting | ||
|
||
In drivers which support it, you can easily execute JavaScript: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.