mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
add a few more examples to README [ci skip]
This commit is contained in:
parent
b5c17eb3e7
commit
6adb0b0bf9
1 changed files with 5 additions and 0 deletions
|
@ -496,8 +496,12 @@ You can also find specific elements, in order to manipulate them:
|
|||
|
||||
```ruby
|
||||
find_field('First Name').value
|
||||
find_field(id: 'my_field').value
|
||||
find_link('Hello', :visible => :all).visible?
|
||||
find_link(class: ['some_class', 'some_other_class'], :visible => :all).visible?
|
||||
|
||||
find_button('Send').click
|
||||
find_button(value: '1234').click
|
||||
|
||||
find(:xpath, "//table/tr").click
|
||||
find("#overlay").find("h1").click
|
||||
|
@ -509,6 +513,7 @@ If you find yourself needing to use this a lot you may be better off adding a [c
|
|||
|
||||
```ruby
|
||||
find_field('First Name'){ |el| el['data-xyz'] == '123' }
|
||||
find("#img_loading"){ |img| img['complete'] == true }
|
||||
````
|
||||
|
||||
**Note**: `find` will wait for an element to appear on the page, as explained in the
|
||||
|
|
Loading…
Reference in a new issue