Class: InternetExplorer
- Inherits:
-
Browser
show all
- Defined in:
- lib/hanoi/browsers/internet_explorer.rb
Instance Method Summary
collapse
Methods inherited from Browser
#escaped_name, #host, #installed?, #linux?, #macos?, #path, #teardown, #to_s, #windows?
Instance Method Details
#name ⇒ Object
23
24
25
|
# File 'lib/hanoi/browsers/internet_explorer.rb', line 23
def name
"Internet Explorer"
end
|
#runnable? ⇒ Boolean
10
11
12
|
# File 'lib/hanoi/browsers/internet_explorer.rb', line 10
def runnable?
supported?
end
|
#setup ⇒ Object
2
3
4
|
# File 'lib/hanoi/browsers/internet_explorer.rb', line 2
def setup
require 'win32ole' if windows?
end
|
#supported? ⇒ Boolean
6
7
8
|
# File 'lib/hanoi/browsers/internet_explorer.rb', line 6
def supported?
windows?
end
|
#visit(url) ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/hanoi/browsers/internet_explorer.rb', line 14
def visit(url)
if windows?
ie = WIN32OLE.new('InternetExplorer.Application')
ie.visible = true
ie.Navigate(url)
sleep 0.01 while ie.Busy || ie.ReadyState != 4
end
end
|