Actually you can. And without any problem through usual
browser.window(:title=>"Browser title").use do
  code
end

or even to sub-window
browser.window(:title=>"Browser title").use do
  code
  browser.window(:title=>"Browser title").use do
    code
    browser.window(:title=>"Browser title").use do
      code
    end
  end
end

If we speak about alerts and etc, so it is separate API:
browser.alert.ok
or
browser.alert.close
etc

On Saturday, February 2, 2013 6:45:56 PM UTC+2, Jim Evans wrote:
>
> You don't. The WebDriver API doesn't support attaching to an existing 
> browser yet, so watir-webdriver can't provide this functionality either. 
> Additionally, a large use case for attaching to an existing browser window 
> is in manipulating popup browser windows[1], and WebDriver does provide a 
> Window API for that purpose. How watir-webdriver exploits that API, I 
> couldn't say.
>
> --Jim
>
> [1] Disclaimer: I don't mean to suggest that there aren't other use cases 
> for the .attach method, or that popup windows are the most important use 
> case for that API, or even that it's the use case you're trying to solve. 
> I'm just presenting the state of things as they are in WebDriver. Patches, 
> as always, gratefully received.
>
>

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to