Class: Watir::FrameJavaScripter
- Inherits:
-
JavaScripter
- Object
- JavaScripter
- Watir::FrameJavaScripter
- Defined in:
- lib/safariwatir/scripter.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(frame) ⇒ FrameJavaScripter
constructor
A new instance of FrameJavaScripter.
- #wrap(script) ⇒ Object
Methods inherited from JavaScripter
Constructor Details
#initialize(frame) ⇒ FrameJavaScripter
Returns a new instance of FrameJavaScripter.
68 69 70 |
# File 'lib/safariwatir/scripter.rb', line 68 def initialize(frame) @page_container = "parent.#{frame.name}" end |
Instance Method Details
#wrap(script) ⇒ Object
72 73 74 75 76 77 |
# File 'lib/safariwatir/scripter.rb', line 72 def wrap(script) # add in frame name when referencing parent or document script.gsub! "parent", "parent.#{@page_container}" script.gsub! "document", "#{@page_container}.document" super(script) end |