Class: IEBrowser

Inherits:
Browser show all
Defined in:
lib/test/browser.rb

Instance Method Summary collapse

Methods inherited from Browser

#applescript, #host, #linux?, #macos?, #open, #teardown, #windows?

Instance Method Details

#setupObject



69
70
71
# File 'lib/test/browser.rb', line 69

def setup
  require 'win32ole' if windows?
end

#supported?Boolean

Returns:

  • (Boolean)


73
74
75
# File 'lib/test/browser.rb', line 73

def supported?
  windows?
end

#to_sObject



88
89
90
# File 'lib/test/browser.rb', line 88

def to_s
  "Internet Explorer"
end

#visit(url) ⇒ Object



77
78
79
80
81
82
83
84
85
86
# File 'lib/test/browser.rb', line 77

def visit(url)
  if windows?
    ie = WIN32OLE.new('InternetExplorer.Application')
    ie.visible = true
    ie.Navigate(url)
    while ie.ReadyState != 4 do
      sleep(1)
    end
  end
end