Method: Capybara::Session#within_frame
- Defined in:
- lib/capybara/session.rb
#within_frame(element) ⇒ Object #within_frame([kind = :frame], locator, **options) ⇒ Object #within_frame(index) ⇒ Object
Execute the given block within the given iframe using given frame, frame name/id or index. May not be supported by all drivers.
447 448 449 450 451 452 453 454 |
# File 'lib/capybara/session.rb', line 447 def within_frame(*args, **kw_args) switch_to_frame(_find_frame(*args, **kw_args)) begin yield if block_given? ensure switch_to_frame(:parent) end end |