Module: Async::WebDriver::Scope::Frames

Included in:
Async::WebDriver::Session
Defined in:
lib/async/webdriver/scope/frames.rb

Overview

Helpers for working with frames.

“‘ ruby session.switch_to_frame(frame) session.switch_to_parent_frame “`

Instance Method Summary collapse

Instance Method Details

#switch_to_frame(frame) ⇒ Object

Switch to the given frame.



20
21
22
# File 'lib/async/webdriver/scope/frames.rb', line 20

def switch_to_frame(frame)
  session.post("frame", {id: frame})
end

#switch_to_parent_frameObject

Switch back to the parent frame.

You should use this method to switch back to the parent frame after switching to a child frame.



27
28
29
# File 'lib/async/webdriver/scope/frames.rb', line 27

def switch_to_parent_frame
  session.post("frame/parent")
end