Class: WebDriverScriptAdapter::FrameAdapter::SeleniumAdapter
- Inherits:
-
DumbDelegator
- Object
- DumbDelegator
- WebDriverScriptAdapter::FrameAdapter::SeleniumAdapter
- Defined in:
- lib/webdriver_script_adapter/frame_adapter.rb
Instance Method Summary collapse
Instance Method Details
#find_frames ⇒ Object
51 52 53 |
# File 'lib/webdriver_script_adapter/frame_adapter.rb', line 51 def find_frames find_elements(:css, 'iframe') end |
#within_frame(frame) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/webdriver_script_adapter/frame_adapter.rb', line 37 def within_frame(frame) switch_to.frame(frame) yield ensure begin switch_to.parent_frame rescue => e if /switchToParentFrame|frame\/parent/.match(e.) ::Kernel.warn "WARNING: This browser only supports first-level iframes. Second-level iframes and beyond will not be audited. To skip auditing all iframes, set Axe::Configuration#skip_iframes=true" end switch_to.default_content end end |