prototype: Fix jstest.rb IE support so you don't have to close the IE window after each test (yay!). Closes #8207.
This commit is contained in:
parent
b360a93999
commit
310b3eccfa
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Fix jstest.rb IE support so you don't have to close the IE window after each test (yay!). Closes #8207. [Ryan Schuft]
|
||||
|
||||
* Fix jstest.rb Konqueror support. Closes #7140. [Christophe Porteneuve]
|
||||
|
||||
* Fix regression in which no-argument calls to Element.addMethods() would not add the methods defined in Form.Methods and Form.Element.Methods. Closes #8206. [Tobie Langel, fwittekind]
|
||||
|
|
|
@ -72,20 +72,8 @@ class SafariBrowser < Browser
|
|||
end
|
||||
|
||||
class IEBrowser < Browser
|
||||
def initialize(path=File.join(ENV['ProgramFiles'] || 'c:\Program Files', '\Internet Explorer\IEXPLORE.EXE'))
|
||||
@path = path
|
||||
end
|
||||
|
||||
def setup
|
||||
if windows?
|
||||
puts %{
|
||||
MAJOR ANNOYANCE on Windows.
|
||||
You have to shut down the Internet Explorer manually after each test
|
||||
for the script to proceed.
|
||||
Any suggestions on fixing this is GREATLY appreaciated!
|
||||
Thank you for your understanding.
|
||||
}
|
||||
end
|
||||
require 'win32ole' if windows?
|
||||
end
|
||||
|
||||
def supported?
|
||||
|
@ -93,7 +81,14 @@ class IEBrowser < Browser
|
|||
end
|
||||
|
||||
def visit(url)
|
||||
system("#{@path} #{url}") if windows?
|
||||
if windows?
|
||||
ie = WIN32OLE.new('InternetExplorer.Application')
|
||||
ie.visible = true
|
||||
ie.Navigate(url)
|
||||
while ie.ReadyState != 4 do
|
||||
sleep(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
|
Loading…
Reference in New Issue