This appears to be a frequently-encountered issue of firewatir; it cannot handle multiple browser windows. I recommend Vapir-Firefox which is a much-improved fork of Firewatir. see http://vapir.org/ for information on this library.
On Mon, Nov 8, 2010 at 02:07, Pavithra <[email protected]> wrote: > Hi, > I am testing the website in Firefox. > > On a click of the link it opens the new browser window and I closed > that using close method. > But after closing its unable to identify the objects using browser > variable. Below was my browser variable which worked to open the > website and perform various actions, however the same variable is not > working after closing the second browser window. > > For 1st browser > @@browser = Watir::Browser.new > > For 2nd browser: > @@browser1 = Watir::Browser > > Testcase flow: > @@browser.link(:text,"XYZ").click [Worked] > @@abc=@@browser1.attach(:url,"http://xyz") [Worked] > @@abc.close() > [Worked] > @@browser.link(:text,"ABCD").click [Not working] > > Note: After closing the second browser window, its showing my initial > browser, however i am not sure whether the script has come back to > initial browser. > Kindly help me out to get back to the initial browser window. > > Thanks, > Pavithra > > > -- > 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] > -- 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]
