Skip to content

Commit f072bb9

Browse files
committed
Update README.md for frame method.
1 parent e4d6d8d commit f072bb9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,17 @@ browser.frames # =>
848848
# ]
849849
```
850850

851+
### frame: `Frame | nil`
852+
853+
Return the frame object within parent element use [frame](https://github.com/rubycdp/ferrum#frame-1) method.
854+
855+
```ruby
856+
frame = p.at_css('iframe').frame # => #<Ferrum::Frame >,
857+
858+
# You can use finder method on frame object as a normal element.
859+
frame.at_css("body").text
860+
```
861+
851862
#### main_frame : `Frame`
852863

853864
Returns page's main frame, the top of the tree and the parent of all frames.

0 commit comments

Comments
 (0)