System: Window 7 Internet Explorer 8 Ruby 1.8 Watir 1.6.5
If I manually open a browser window and then visit a site that causes a second browser window to open and then use the Watir::IE.attach method to find the second browser window everything work fine. The problem is when I open the first Internet Explorer window with the command Watir::IE.new and then visit a site that causes a second browser window to open. When I use Watir::IE.attach to find the second browser window I now get: Watir::Exception::NoMatchingWindowFoundException: Unable to location a window with title of (?-mix:x) from /ie-class.rb:297:in 'attach_browser_window' from /ie-class.rb:149:in '_attach_init' from /ie-class.rb:143:in 'attach' from (irb):15
Has anyone run into this problem and developed a solution?
I have done a little more investigating and I am running my script with administrative rights, and it is opening IE8 as administrator and then trying to open a new window. I tried to open IE8 as administrator manually and then open a new window from the browser then run the attach command with watir and I did get the same error as if I created the initial window with watir.
I do want to be able to run my script as administrator.
I have tried executing the watir command manually and also running in a script:
======================
require 'rubygems'
require 'watir'
ie = Watir::IE.start("http://www.quackit.com/html/codes/html_open_link_in_new_window.cfm")
ie.link(:text,"HTML Help").click
ie2 = Watir::IE.attach(:title,/Help/)
======================