Thanx this works 

class IE
    def window_exists?
        begin   
             return false if @ie.hWnd== -1    
             return true
        rescue      
            return false
       end
   end
 end


if __FILE__ == $0
    require 'neteller'
    Test::Unit::TestCase

    class TC_ie < Test::Unit::TestCase
   
        def test_open
            openIE=Watir::IE.new
            assert(openIE.window_exists?)
            openIE.close
        end
        
        def test_close
            closeIE=Watir::IE.new
            closeIE.close
            assert_false(closeIE.window_exists?)               
        end
           
    end
end    



_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to