$ie.ie.visible = false
At 11:12 AM 8/18/2005, Peter Chau wrote:
This code works for minimize and background IE browsers... Is there a way to turn background on/off in the middle of a script?? require 'watir' include Watir class IE def exists? begin @ie.hWnd== -1 return true rescue return false end end end if __FILE__ == $0 require 'test/unit' class TC_ie < Test::Unit::TestCase def test_open $ie=IE.new assert($ie.exists?) $ie.close end def test_close $ie=IE.new $ie.close sleep 0.1 # the browser takes some time to close assert(!$ie.exists?) end def test_minimize $ie=IE.new $ie.goto("http://www.google.ca") # can't minimize a blank window because it throws an error $ie.minimize assert($ie.exists?) $ie.close end def test_invisible_open command_line_flag('-b') # this doesn't work the way I want $ie=IE.new assert($ie.exists?) $ie.close end end end _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
_____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general