### Home Classes Methods

### In Files

- jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb

### Parent

Object

### Methods

- ::new
- #addCookie
- #browser
- #clearElement
- #clickElement
- #close
- #deleteAllCookies
- #deleteCookie
- #dragElement
- #driver_extensions
- #executeScript
- #finalize
- #findElementByClassName
- #findElementById
- #findElementByLinkText
- #findElementByName
- #findElementByPartialLinkText
- #findElementByTagName
- #findElementByXpath
- #findElementsByClassName
- #findElementsById
- #findElementsByLinkText
- #findElementsByName
- #findElementsByPartialLinkText
- #findElementsByTagName
- #findElementsByXpath
- #get
- #getAllCookies
- #getBrowserVisible
- #getCurrentUrl
- #getCurrentWindowHandle
- #getElementAttribute
- #getElementLocation
- #getElementSize
- #getElementTagName
- #getElementText
- #getElementValue
- #getElementValueOfCssProperty
- #getPageSource
- #getSpeed
- #getTitle
- #getWindowHandles
- #goBack
- #goForward
- #hoverOverElement
- #isElementDisplayed
- #isElementEnabled
- #isElementSelected
- #quit
- #refresh
- #sendKeysToElement
- #setBrowserVisible
- #setElementSelected
- #setImplicitWaitTimeout
- #setSpeed
- #submitElement
- #switchToActiveElement
- #switchToDefaultContent
- #switchToFrame
- #switchToWindow
- #toggleElement
- #waitForLoadToComplete

### Included Modules

- Selenium::WebDriver::IE::Util

### Class/Module Index

Quicksearch

- Selenium
- Selenium::WebDriver
- Selenium::WebDriver::BridgeHelper
- Selenium::WebDriver::ChildProcess
- Selenium::WebDriver::ChildProcess::IronRubyProcess
- Selenium::WebDriver::ChildProcess::JRubyProcess
- Selenium::WebDriver::ChildProcess::WindowsProcess
- Selenium::WebDriver::Chrome
- Selenium::WebDriver::Chrome::Bridge
- Selenium::WebDriver::Chrome::CommandExecutor
- Selenium::WebDriver::Chrome::Launcher
- Selenium::WebDriver::Chrome::Launcher::MacOSXLauncher
- Selenium::WebDriver::Chrome::Launcher::UnixLauncher
- Selenium::WebDriver::Chrome::Launcher::WindowsLauncher
- Selenium::WebDriver::Driver
- Selenium::WebDriver::DriverExtensions
- Selenium::WebDriver::DriverExtensions::TakesScreenshot
- Selenium::WebDriver::Element
- Selenium::WebDriver::Error
- Selenium::WebDriver::Error::ElementNotDisplayedError
- Selenium::WebDriver::Error::ElementNotEnabledError
- Selenium::WebDriver::Error::ElementNotSelectableError
- Selenium::WebDriver::Error::ExpectedError
- Selenium::WebDriver::Error::IndexOutOfBoundsError
- Selenium::WebDriver::Error::InvalidCookieDomainError
- Selenium::WebDriver::Error::NoCollectionError
- Selenium::WebDriver::Error::NoScriptResultError
- Selenium::WebDriver::Error::NoStringError
- Selenium::WebDriver::Error::NoStringLengthError
- Selenium::WebDriver::Error::NoStringWrapperError
- Selenium::WebDriver::Error::NoSuchCollectionError
- Selenium::WebDriver::Error::NoSuchDocumentError
- Selenium::WebDriver::Error::NoSuchDriverError
- Selenium::WebDriver::Error::NoSuchElementError
- Selenium::WebDriver::Error::NoSuchFrameError
- Selenium::WebDriver::Error::NoSuchWindowError
- Selenium::WebDriver::Error::NullPointerError
- Selenium::WebDriver::Error::ObsoleteElementError
- Selenium::WebDriver::Error::ServerError
- Selenium::WebDriver::Error::TimeOutError
- Selenium::WebDriver::Error::UnableToSetCookieError
- Selenium::WebDriver::Error::UnexpectedJavascriptError
- Selenium::WebDriver::Error::UnhandledError
- Selenium::WebDriver::Error::UnknownCommandError
- Selenium::WebDriver::Error::UnknownScriptResultError
- Selenium::WebDriver::Error::UnsupportedOperationError
- Selenium::WebDriver::Error::WebDriverError
- Selenium::WebDriver::FileReaper
- Selenium::WebDriver::Find
- Selenium::WebDriver::Firefox
- Selenium::WebDriver::Firefox::Binary
- Selenium::WebDriver::Firefox::Bridge
- Selenium::WebDriver::Firefox::Launcher
- Selenium::WebDriver::Firefox::Profile
- Selenium::WebDriver::Firefox::ProfilesIni
- Selenium::WebDriver::Firefox::Util
- Selenium::WebDriver::IE
- Selenium::WebDriver::IE::Bridge
- Selenium::WebDriver::IE::Kernel32
- Selenium::WebDriver::IE::Lib
- Selenium::WebDriver::IE::Util
- Selenium::WebDriver::Keys
- Selenium::WebDriver::Navigation
- Selenium::WebDriver::Options
- Selenium::WebDriver::Platform
- Selenium::WebDriver::Remote
- Selenium::WebDriver::Remote::Bridge
- Selenium::WebDriver::Remote::Capabilities
- Selenium::WebDriver::Remote::Http
- Selenium::WebDriver::Remote::Http::Common
- Selenium::WebDriver::Remote::Http::Curb
- Selenium::WebDriver::Remote::Http::Default
- Selenium::WebDriver::Remote::Response
- Selenium::WebDriver::TargetLocator
- Selenium::WebDriver::Timeouts
- Dir
- SocketError
- String

No matching classes.

# Selenium::WebDriver::IE::Bridge

@private

### Public Class Methods

new() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 12
    def initialize
      ptr_ref = FFI::MemoryPointer.new :pointer

      check_error_code Lib.wdNewDriverInstance(ptr_ref),
                       "could not create driver instance"

      @driver_pointer = ptr_ref.get_pointer(0)
      @speed          = :fast
    end

### Public Instance Methods

addCookie(opts) click to toggle source

Configuration

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 176
    def addCookie(opts)
      cookie_string  = "#{opts[:name]}=#{opts[:value]}; "
      cookie_string << "path=#{opts[:path]}; "                  if opts[:path] && !opts[:path].empty?
      cookie_string << "domain=#{opts[:domain][/^(.+?):/, 1]};" if opts[:domain] && !opts[:domain].empty?

      check_error_code Lib.wdAddCookie(@driver_pointer, wstring_ptr(cookie_string)),
                       "unable to add cookie"
    end

browser() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 22
    def browser
      :internet_explorer
    end

clearElement(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 369
    def clearElement(element_pointer)
      check_error_code Lib.wdeClear(element_pointer), "unable to clear element"
    end

clickElement(element_pointer) click to toggle source

Element functions

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 334
    def clickElement(element_pointer)
      check_error_code Lib.wdeClick(element_pointer), "unable to click element"
    end

close() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 122
    def close
      check_error_code Lib.wdClose(@driver_pointer), "unable to close driver"
    end

deleteAllCookies() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 209
    def deleteAllCookies
      raise NotImplementedError, "missing from IE driver"
    end

deleteCookie(name) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 205
    def deleteCookie(name)
      raise NotImplementedError, "missing from IE driver"
    end

dragElement(element_pointer, right_by, down_by) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 437
    def dragElement(element_pointer, right_by, down_by)
      # TODO: check return values?
      hwnd                = FFI::MemoryPointer.new :pointer
      x, y, width, height = Array.new(4) { FFI::MemoryPointer.new :long }

      check_error_code Lib.wdeGetDetailsOnceScrolledOnToScreen(element_pointer, hwnd, x, y, width, height),
                       "unable to determine location once scrolled on to screen"

      Lib.wdeMouseDownAt(hwnd.get_pointer(0), x.get_long(0), y.get_long(0))

      destination_x = x.get_long(0) + right_by
      destination_y = y.get_long(0) + down_by
      duration      = 500 # TODO: parent.manage().getSpeed().getTimeOut();

      Lib.wdeMouseMoveTo(hwnd.get_pointer(0), duration, x.get_long(0), y.get_long(0), destination_x, destination_y)
      Lib.wdeMouseUpAt(hwnd.get_pointer(0), destination_x, destination_y)
    ensure
      [hwnd, x, y, width, height].each { |pointer| pointer.free }
    end

driver_extensions() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 26
    def driver_extensions
      []
    end

executeScript(script, *args) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 146
    def executeScript(script, *args)
      script_args_ref = FFI::MemoryPointer.new :pointer
      result          = Lib.wdNewScriptArgs(script_args_ref, args.size)

      check_error_code result, "unable to create new script arguments array"

      args_pointer = script_args_ref.get_pointer(0)
      populate_arguments(result, args_pointer, args)

      script            = "(function() { return function(){" + script + "};})();"
      script_result_ref = FFI::MemoryPointer.new :pointer

      check_error_code Lib.wdExecuteScript(@driver_pointer, wstring_ptr(script), args_pointer, script_result_ref),
                       "Cannot execute script"

      extract_return_value script_result_ref
    ensure
      script_args_ref.free
      script_result_ref.free if script_result_ref
      Lib.wdFreeScriptArgs(args_pointer) if args_pointer
    end

finalize(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 481
    def finalize(element_pointer)
      check_error_code Lib.wdeFreeElement(element_pointer),
                       "unable to finalize #{element_pointer} for #{self}"
    end

findElementByClassName(parent, class_name) click to toggle source

Finders

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 225
    def findElementByClassName(parent, class_name)
      # TODO: argument checks

      create_element do |raw_element|
        check_error_code Lib.wdFindElementByClassName(@driver_pointer, parent, wstring_ptr(class_name), raw_element),
                         "unable to find element by class name using #{class_name.inspect}"
      end
    end

findElementById(parent, id) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 243
    def findElementById(parent, id)
      create_element do |raw_element|
        check_error_code Lib.wdFindElementById(@driver_pointer, parent, wstring_ptr(id), raw_element),
                         "unable to find element by id using #{id.inspect}"
      end
    end

findElementByLinkText(parent, link_text) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 257
    def findElementByLinkText(parent, link_text)
      create_element do |raw_element|
        check_error_code Lib.wdFindElementByLinkText(@driver_pointer, parent, wstring_ptr(link_text), raw_element),
                         "unable to find element by link text using #{link_text.inspect}"
      end
    end

findElementByName(parent, name) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 285
    def findElementByName(parent, name)
      create_element do |raw_element|
        check_error_code Lib.wdFindElementByName(@driver_pointer, parent, wstring_ptr(name), raw_element),
                         "unable to find element by name using #{name.inspect}"
      end
    end

findElementByPartialLinkText(parent, link_text) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 271
    def findElementByPartialLinkText(parent, link_text)
      create_element do |raw_element|
        check_error_code Lib.wdFindElementByPartialLinkText(@driver_pointer, parent, wstring_ptr(link_text), raw_element),
                         "unable to find element by partial link text using #{link_text.inspect}"
      end
    end

findElementByTagName(parent, tag_name) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 299
    def findElementByTagName(parent, tag_name)
      create_element do |raw_element|
        check_error_code Lib.wdFindElementByTagName(@driver_pointer, parent, wstring_ptr(tag_name), raw_element),
                         "unable to find element by tag name using #{tag_name.inspect}"
      end
    end

findElementByXpath(parent, xpath) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 313
    def findElementByXpath(parent, xpath)
      create_element do |raw_element|
        check_error_code Lib.wdFindElementByXPath(@driver_pointer, parent, wstring_ptr(xpath), raw_element),
                         "unable to find element by xpath using #{xpath.inspect}"
        # TODO: Additional error handling
      end
    end

findElementsByClassName(parent, class_name) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 234
    def findElementsByClassName(parent, class_name)
      # TODO: argument checks

      create_element_collection do |raw_elements|
        check_error_code Lib.wdFindElementsByClassName(@driver_pointer, parent, wstring_ptr(class_name), raw_elements),
                         "unable to find elements by class name using #{class_name.inspect}"
      end
    end

findElementsById(parent, id) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 250
    def findElementsById(parent, id)
      create_element_collection do |raw_elements|
        check_error_code Lib.wdFindElementsById(@driver_pointer, parent, wstring_ptr(id), raw_elements),
                         "unable to find elements by id using #{id.inspect}"
      end
    end

findElementsByLinkText(parent, link_text) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 264
    def findElementsByLinkText(parent, link_text)
      create_element_collection do |raw_elements|
        check_error_code Lib.wdFindElementsByLinkText(@driver_pointer, parent, wstring_ptr(link_text), raw_elements),
                         "unable to find elements by link text using #{link_text.inspect}"
      end
    end

findElementsByName(parent, name) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 292
    def findElementsByName(parent, name)
      create_element_collection do |raw_elements|
        check_error_code Lib.wdFindElementsByName(@driver_pointer, parent, wstring_ptr(name), raw_elements),
                         "unable to find elements by name using #{name.inspect}"
      end
    end

findElementsByPartialLinkText(parent, link_text) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 278
    def findElementsByPartialLinkText(parent, link_text)
      create_element_collection do |raw_elements|
        check_error_code Lib.wdFindElementsByPartialLinkText(@driver_pointer, parent, wstring_ptr(link_text), raw_elements),
                         "unable to find elements by partial link text using #{link_text.inspect}"
      end
    end

findElementsByTagName(parent, tag_name) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 306
    def findElementsByTagName(parent, tag_name)
      create_element_collection do |raw_elements|
        check_error_code Lib.wdFindElementsByTagName(@driver_pointer, parent, wstring_ptr(tag_name), raw_elements),
                         "unable to find elements by tag name using #{tag_name.inspect}"
      end
    end

findElementsByXpath(parent, xpath) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 321
    def findElementsByXpath(parent, xpath)
      create_element_collection do |raw_elements|
        check_error_code Lib.wdFindElementsByXPath(@driver_pointer, parent, wstring_ptr(xpath), raw_elements),
                         "unable to find elements by xpath using #{xpath.inspect}"
        # TODO: Additional error handling
      end
    end

get(url) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 30
    def get(url)
      check_error_code Lib.wdGet(@driver_pointer, wstring_ptr(url)),
                       "Cannot get url #{url.inspect}"
    end

getAllCookies() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 185
    def getAllCookies
      str = create_string do |wrapper|
        check_error_code Lib.wdGetCookies(@driver_pointer, wrapper), "unable to get cookies"
      end

      str.split("; ").map do |cookie_string|
        parts = cookie_string.split("=")
        next unless parts.size == 2

        {
          'name'    => parts[0],
          'value'   => parts[1],
          'domain'  => getCurrentUrl,
          'path'    => "",
          'expires' => nil,
          'secure'  => false
        }
      end.compact
    end

getBrowserVisible() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 66
    def getBrowserVisible
      int_ptr = FFI::MemoryPointer.new :int
      check_error_code Lib.wdGetVisible(@driver_pointer, int_ptr), "unable to determine if browser is visible"

      int_ptr.get_int(0) == 1
    ensure
      int_ptr.free
    end

getCurrentUrl() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 35
    def getCurrentUrl
      create_string do |wrapper|
        check_error_code Lib.wdGetCurrentUrl(@driver_pointer, wrapper),
                         "unable to get current URL"
      end
    end

getCurrentWindowHandle() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 139
    def getCurrentWindowHandle
      create_string do |string_pointer|
        check_error_code Lib.wdGetCurrentWindowHandle(@driver_pointer, string_pointer),
                         "unable to obtain current window handle"
      end
    end

getElementAttribute(element_pointer, name) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 345
    def getElementAttribute(element_pointer, name)
      create_string do |string_pointer|
        check_error_code Lib.wdeGetAttribute(@driver_pointer, element_pointer, wstring_ptr(name), string_pointer),
                         "unable to get attribute #{name.inspect}"
      end
    end

getElementLocation(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 457
    def getElementLocation(element_pointer)
      x = FFI::MemoryPointer.new :long
      y = FFI::MemoryPointer.new :long

      check_error_code Lib.wdeGetLocation(element_pointer, x, y), "unable to get location of element"

      Point.new x.get_int(0), y.get_int(0)
    ensure
      x.free
      y.free
    end

getElementSize(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 469
    def getElementSize(element_pointer)
      width  = FFI::MemoryPointer.new :long
      height = FFI::MemoryPointer.new :long

      check_error_code Lib.wdeGetSize(element_pointer, width, height), "unable to get size of element"

      Dimension.new width.get_int(0), height.get_int(0)
    ensure
      width.free
      height.free
    end

getElementTagName(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 338
    def getElementTagName(element_pointer)
      create_string do |string_pointer|
        check_error_code Lib.wdeGetTagName(element_pointer, string_pointer),
                         "unable to get tag name"
      end
    end

getElementText(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 356
    def getElementText(element_pointer)
      create_string do |string_pointer|
        check_error_code Lib.wdeGetText(element_pointer, string_pointer),
                         "unable to get text"
      end.gsub("\r\n", "\n")
    end

getElementValue(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 352
    def getElementValue(element_pointer)
      getElementAttribute(element_pointer, 'value').gsub("\r\n", "\n")
    end

getElementValueOfCssProperty(element_pointer, prop) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 426
    def getElementValueOfCssProperty(element_pointer, prop)
      create_string do |string_pointer|
        check_error_code Lib.wdeGetValueOfCssProperty(element_pointer, wstring_ptr(prop), string_pointer),
                         "unable to get value of css property: #{prop.inspect}"
      end
    end

getPageSource() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 59
    def getPageSource
      create_string do |wrapper|
        check_error_code Lib.wdGetPageSource(@driver_pointer, wrapper),
                         "unable to get page source"
      end
    end

getSpeed() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 217
    def getSpeed
      @speed
    end

getTitle() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 52
    def getTitle
      create_string do |wrapper|
        check_error_code Lib.wdGetTitle(@driver_pointer, wrapper),
                         "unable to get title"
      end
    end

getWindowHandles() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 130
    def getWindowHandles
      raw_handles = FFI::MemoryPointer.new :pointer
      check_error_code Lib.wdGetAllWindowHandles(@driver_pointer, raw_handles),
                       "unable to obtain all window handles"

      string_array_from(raw_handles).uniq
      # TODO: who calls raw_handles.free if exception is raised?
    end

goBack() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 42
    def goBack
      check_error_code Lib.wdGoBack(@driver_pointer),
                       "Cannot navigate back"
    end

goForward() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 47
    def goForward
      check_error_code Lib.wdGoForward(@driver_pointer),
                       "Cannot navigate back"
    end

hoverOverElement(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 433
    def hoverOverElement(element_pointer)
      raise NotImplementedError
    end

isElementDisplayed(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 393
    def isElementDisplayed(element_pointer)
      int_ptr = FFI::MemoryPointer.new :int
      check_error_code Lib.wdeIsDisplayed(element_pointer, int_ptr), "unable to check visibilty"

      int_ptr.get_int(0) == 1;
    ensure
      int_ptr.free
    end

isElementEnabled(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 373
    def isElementEnabled(element_pointer)
      int_ptr = FFI::MemoryPointer.new(:int)
      check_error_code Lib.wdeIsEnabled(element_pointer, int_ptr),
                       "unable to get enabled state"

      int_ptr.get_int(0) == 1
    ensure
      int_ptr.free
    end

isElementSelected(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 383
    def isElementSelected(element_pointer)
      int_ptr = FFI::MemoryPointer.new(:int)
      check_error_code Lib.wdeIsSelected(element_pointer, int_ptr),
                       "unable to get selected state"

      int_ptr.get_int(0) == 1
    ensure
      int_ptr.free
    end

quit() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 106
    def quit
      getWindowHandles.each do |handle|
        begin
          switchToWindow handle
          close
        rescue Error::NoSuchWindowError
        end
      end

      # hack
      ObjectSpace.each_object(WebDriver::Element) { |e| finalize e.ref if e.bridge == self }
    ensure
      Lib.wdFreeDriver(@driver_pointer)
      @driver_pointer = nil
    end

refresh() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 126
    def refresh
      check_error_code Lib.wdRefresh(@driver_pointer), "unable to refresh current page"
    end

sendKeysToElement(element_pointer, string) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 363
    def sendKeysToElement(element_pointer, string)
      check_error_code Lib.wdeSendKeys(element_pointer, wstring_ptr(string)),
                       "unable to send keys to #{self}"
      waitForLoadToComplete
    end

setBrowserVisible(bool) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 75
    def setBrowserVisible(bool)
      check_error_code Lib.wdSetVisible(@driver_pointer, bool ? 1 : 0),
                       "unable to change the visibility of the browser"
    end

setElementSelected(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 422
    def setElementSelected(element_pointer)
      check_error_code Lib.wdeSetSelected(element_pointer), "unable to select element"
    end

setImplicitWaitTimeout(milliseconds) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 80
    def setImplicitWaitTimeout(milliseconds)
      check_error_code Lib.wdSetImplicitWaitTimeout(@driver_pointer, milliseconds),
                       "unable to set implicit wait timeout"
    end

setSpeed(speed) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 213
    def setSpeed(speed)
      @speed = speed
    end

submitElement(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 402
    def submitElement(element_pointer)
      check_error_code Lib.wdeSubmit(element_pointer), "unable to submit element"
    end

switchToActiveElement() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 95
    def switchToActiveElement
      create_element do |ptr|
        check_error_code Lib.wdSwitchToActiveElement(@driver_pointer, ptr),
                         "unable to switch to active element"
      end
    end

switchToDefaultContent() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 102
    def switchToDefaultContent
      switchToFrame ""
    end

switchToFrame(id) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 90
    def switchToFrame(id)
      check_error_code Lib.wdSwitchToFrame(@driver_pointer, wstring_ptr(id)),
                       "unable to locate frame #{id.inspect}"
    end

switchToWindow(id) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 85
    def switchToWindow(id)
      check_error_code Lib.wdSwitchToWindow(@driver_pointer, wstring_ptr(id)),
                       "unable to locate window #{id.inspect}"
    end

toggleElement(element_pointer) click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 406
    def toggleElement(element_pointer)
      int_ptr = FFI::MemoryPointer.new :int
      result = Lib.wdeToggle(element_pointer, int_ptr)

      if result == 9
        raise WebDriver::UnsupportedOperationError,
          "You may not toggle this element: #{get_element_tag_name(element_pointer)}"
      end

      check_error_code result, "unable to toggle element"

      int_ptr.get_int(0) == 1
    ensure
      int_ptr.free
    end

waitForLoadToComplete() click to toggle source

    # File jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb, line 168
    def waitForLoadToComplete
      Lib.wdWaitForLoadToComplete(@driver_pointer)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.