Hi Željko, 

Thank you   for your quick reply.
I have used your suggested code and made it as

require "rubygems"
require "watir-webdriver"
browser = Watir::Browser.new :ff
browser.goto "www.google.com"
sleep 2
browser.window(:title => "Google").use do
  browser.button(:id => "close").click
end

the error says,
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.1/lib/watir-webdriver/elem
ents/element.rb:365:in `assert_exists': unable to locate element, using 
{:tag_na
me=>"button", :id=>"close"} (Watir::Exception::UnknownObjectException)
        from 
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.1/lib/watir-w
ebdriver/elements/element.rb:95:in `click'
        from test.rb:7
        from 
C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/sel
enium/webdriver/common/target_locator.rb:37:in `window'
        from 
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.1/lib/watir-w
ebdriver/window.rb:99:in `use'
        from test.rb:6

I don't really understand what the code says.
Will you be much more precise ?
TA.

On Thursday, 9 August 2012 15:16:12 UTC+5:30, Željko Filipin wrote:
>
> On Thu, Aug 9, 2012 at 11:41 AM, mani racha <[email protected]<javascript:>> 
> wrote:
> > In my project I need to handle multiple tabs in a single window.
>
> http://watirwebdriver.com/browser-popups/ 
>
> Željko
> --
> filipin.eu  

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to