Class: Watir::FramedDriver Private

Inherits:
Object
  • Object
show all
Defined in:
lib/watir-webdriver/elements/iframe.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

another hack..

Instance Method Summary collapse

Constructor Details

#initialize(element, driver) ⇒ FramedDriver

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of FramedDriver.



115
116
117
118
# File 'lib/watir-webdriver/elements/iframe.rb', line 115

def initialize(element, driver)
  @element = element
  @driver = driver
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &blk) ⇒ Object (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



138
139
140
141
142
143
144
145
# File 'lib/watir-webdriver/elements/iframe.rb', line 138

def method_missing(meth, *args, &blk)
  if @driver.respond_to?(meth)
    switch!
    @driver.send(meth, *args, &blk)
  else
    @element.send(meth, *args, &blk)
  end
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



120
121
122
# File 'lib/watir-webdriver/elements/iframe.rb', line 120

def ==(other)
  wd == other.wd
end

#send_keys(*args) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



125
126
127
128
# File 'lib/watir-webdriver/elements/iframe.rb', line 125

def send_keys(*args)
  switch!
  @driver.switch_to.active_element.send_keys(*args)
end