Class: Watir::FramedDriver Private

Inherits:
Object
  • Object
show all
Defined in:
lib/watir-webdriver/elements/frame.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

- (FramedDriver) initialize(element, driver)

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.

A new instance of FramedDriver



94
95
96
97
# File 'lib/watir-webdriver/elements/frame.rb', line 94

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

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(meth, *args, &blk) (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.



117
118
119
120
121
122
123
124
# File 'lib/watir-webdriver/elements/frame.rb', line 117

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

- (Object) ==(other) 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.



99
100
101
# File 'lib/watir-webdriver/elements/frame.rb', line 99

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

- (Object) send_keys(*args)

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.



104
105
106
107
# File 'lib/watir-webdriver/elements/frame.rb', line 104

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