Class: WebDriverScriptAdapter::FrameAdapter::WatirAdapter
- Inherits:
-
DumbDelegator
- Object
- DumbDelegator
- WebDriverScriptAdapter::FrameAdapter::WatirAdapter
- Defined in:
- lib/webdriver_script_adapter/frame_adapter.rb
Instance Method Summary collapse
- #find_frames ⇒ Object
-
#initialize(driver) ⇒ WatirAdapter
constructor
A new instance of WatirAdapter.
-
#within_frame(frame, &block) ⇒ Object
delegate to Watir’s Selenium #driver.
Constructor Details
#initialize(driver) ⇒ WatirAdapter
Returns a new instance of WatirAdapter.
20 21 22 23 |
# File 'lib/webdriver_script_adapter/frame_adapter.rb', line 20 def initialize(driver) super(driver) @driver = driver end |
Instance Method Details
#find_frames ⇒ Object
30 31 32 |
# File 'lib/webdriver_script_adapter/frame_adapter.rb', line 30 def find_frames find_elements(:css, "iframe") end |
#within_frame(frame, &block) ⇒ Object
delegate to Watir’s Selenium #driver
26 27 28 |
# File 'lib/webdriver_script_adapter/frame_adapter.rb', line 26 def within_frame(frame, &block) SeleniumAdapter.instance_method(:within_frame).bind(FrameAdapter.wrap @driver).call(frame, &block) end |