Hello.

    I found a bug on these functions minimize, restore and maximize.
    To replicate this error is very simple, create a page with no
title or with a empty title.
    When this happen IE put the url is the window title.
    Then when we try to use one of these functions(minimize, restore
and maximize)
    watir will call the function set_window_state in autoit using the
title(code from ie-class):

    def set_window_state(state)
        autoit.WinSetState title, '', autoit.send(state)
    end

    but because the title is empty autoit will not find the window
because the window
    title is the url and will not do nothing.

    I resolved this issue by changing the function title in ie-class
to this:

    def title
     if(@ie.document.title=="")
      return @ie.document.url
     else
      return @ie.document.title
     end
    end

     Watir code:

    require 'test/unit'
    require 'watir'

    class WebTest < Test::Unit::TestCase

     def setup
      @browser = Watir::IE.new
      @browser.goto("http://localhost/FunFxTests/index2.html";)
     end

     def teardown
      @browser.close
     end

     def go_to_page
          @browser.minimize()
          @browser.restore()
          @browser.maximize()
     end

     def test_control
      go_to_page
     end
    end

    Html Code:
    <html>
    <title></title>
    <frameset cols="50%,50%" title="titulo1" text="texto2" >
     <frame src="index2.htm" style="display:none; visibility:hidden">
     <frame src="index3.htm">
    </frameset>
    </html>




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to