From: Raj pal Date: 2013-03-22T16:18:53+09:00 Subject: Re: question on watir hi, puts $browser.windows.count $browser.windows.each do |w| puts w.title w.close end The above code of yours prints the title but it's not closing the window. You asked me to check whether it is a Javascript window,I checked that,it is not JavaScript alert,I have used your code of below puts $browser.alert.text $browser.alert.close It's not working since it's not JavaScript window. I told you I started to use the Model dialog box, But somehow it's having some problem thereby I couldn't continue with that. So can you give me the solution why it's not closing the window, and also you have written the code of below $browser.windows.last.use do $browser. (code to read the message here) end Do i need to use like $browser.windows.last.use do $browser.window.text end to print the string in the pop up?And the pop up consist of OK and cancel button, now i need to have a way to press the both the buttons according to my requirement. Can you give me any solution to resolve this problem? RAJ -- Posted via http://www.ruby-forum.com/.