On Mon, Jun 27, 2011 at 9:07 PM, Abe Heward <[email protected]> wrote: > Watir has the .attach method. > How do I attach to an existing browser window using watir-webdriver?
WebDriver doesn't have the ability to attach to running browser processes. There is an open issue for this [1]. > I need this because, for example, I have scripts that delete the browser > cookies file and if they can't do this they look to see if there are open > browser windows, close them, then try to delete the cookies file again. > For Firefox, WebDriver ensures a clean profile for each Browser instance, so you shouldn't have to worry about this at all. For IE, it should be pretty simple to get rid of all IE windows with e.g. taskkill [1] before running your cleanup script. Jari [1] http://code.google.com/p/selenium/issues/detail?id=18 [2] http://technet.microsoft.com/en-us/library/bb491009.aspx -- 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]
