So your script will have to attach to that window. ---Michael B.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dennis Sent: February 24, 2006 3:09 AM To: [email protected] Subject: Re: [Wtr-general] No new window open Thanx for your reply. But in my javascript code, before the window closed, a new window should open first. Code: if(window.name != "indexwin"){ window.open("about:blank","indexwin","resizable=1,left=0,top=0,height=" +(screen.height-50)+", width="+(screen.width-10)); } form.submit(); if(window.name != "indexwin"){ closeWin(); } As I visit the homepage manully, it works(open a new window and close current window), but when I run using Watir, current window is closed and *no new window open*. Zeljko Filipin wrote: >>sleep(20) >> >> >this is why your script waits 20 seconds > > >>form.submit();> if(window.name != "indexwin"){> closeWin();> } >> >> >I am not very god at javascript, but it looks to me that this closes the window. >_______________________________________________ >Wtr-general mailing list >[email protected] >http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
