From: Prog Rammer Date: 2012-11-28T22:58:22+09:00 Subject: Re: Few unclosed browser >>> br.close rescue nil >> What is the diffrence? > > This will attempt to close the browser even if it is nil, it just > removes the chance of the "if" statement missing something. > >>> I'd also add that line before "br=Watir::Browser.new :ie", just in case >>> there's something there. >> even if something is there.. it will get overwritten..right? > > If there is something there, the window might remain open, and webdriver > could open a new window while abandoning the old one. but this says br is not defined. Isnt it correct that br is not defined but we are using 'br'. Probably you are suggesting correct thing which I am not understanding, that is why even putting browser.close() in ensure section gives some unclosed browser at the end. -- Posted via http://www.ruby-forum.com/.