Class: IEBrowser
Instance Method Summary
collapse
Methods inherited from Browser
#applescript, #host, #linux?, #macos?, #open, #teardown, #windows?
Instance Method Details
#setup ⇒ Object
69
70
71
|
# File 'lib/test/browser.rb', line 69
def setup
require 'win32ole' if windows?
end
|
#supported? ⇒ Boolean
73
74
75
|
# File 'lib/test/browser.rb', line 73
def supported?
windows?
end
|
#to_s ⇒ Object
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
|