I'm 99% sure that this is only possible with IE and using watir and not
watir-webdriver. There's an issue opened at the selenium issue tracker for
webdriver, but it's been open for quite a while.
https://code.google.com/p/selenium/issues/detail?id=18
On Wednesday, August 28, 2013 8:04:49 AM UTC-4, Mark Turton wrote:
>
> Hi
>
> I'm trying to write a script that will look for and use a browser window
> (it can be either IE or Firefox) that is *already opened before the
> script is executed*. The attach method works for IE, but it can't with
> Firefox. I tried the window switching trick posted elsewhere, but that only
> seems to work when you clicked a link from the original browser window. It
> can't seem to find a window that was already opened before the script is
> run.
>
> browser = Watir::Browser.attach(:url, /url.com/)
>
> if browser==nil then
>
> raise("Browser with expected URL segment could not be found")
>
> end
>
>
> Any ideas? Thanks in advance. (PS - If this was solved in a prior post,
> apologies for the repetition and please just point me to where. Thanks.)
>
> -Mark
>
--
--
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]
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.