Federico Vela wrote:
> Hi Bret, 
>
> Thanks so much for your reply and sorry for not posting that code initially.
>
> mainFrame.link(:url,%r{Report\.asp}).click
> mainFrame.button(:name,"cmdGo").click
> mainFrame.text_field(:name,"txtInitialDate").set("2/10/2006")
> mainFrame.link(:id,"ViewReport").click
> #previous step should open a new window but makes a VB script error
> reportWindow = IE.attach(:url,%r{ReportV})
>
> The error is:
>
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:1510:in 
> `attach_browser_window': Unable to locate a window with url of 
> (?-mix:ReportV) (Watir::Exception::NoMatchingWindowFoundException)
>       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:1387:in 
> `attach_init'
>       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:1380:in 
> `attach'
>       from Client.rb:259
>
> Thanks for your help
The problem is with line 259 of your script, which is this:

  reportWindow = IE.attach(:url,%r{ReportV})

Not the previous line, as you suspected.
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to