diff --git a/CHANGELOG b/CHANGELOG index 168c195..3acd85f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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] diff --git a/test/lib/jstest.rb b/test/lib/jstest.rb index 5128afa..898dc89 100644 --- a/test/lib/jstest.rb +++ b/test/lib/jstest.rb @@ -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