Class: IEBrowser

Inherits:
Browser show all
Defined in:
lib/newjs/jstest.rb

Instance Method Summary collapse

Methods inherited from Browser

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

Constructor Details

This class inherits a constructor from Browser

Instance Method Details

#setupObject



75
76
77
# File 'lib/newjs/jstest.rb', line 75

def setup
  require 'win32ole' if windows?
end

#supported?Boolean

Returns:

  • (Boolean)


79
80
81
# File 'lib/newjs/jstest.rb', line 79

def supported?
  windows?
end

#to_sObject



94
95
96
# File 'lib/newjs/jstest.rb', line 94

def to_s
  "Internet Explorer"
end

#visit(url) ⇒ Object



83
84
85
86
87
88
89
90
91
92
# File 'lib/newjs/jstest.rb', line 83

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