The code below can help you locate on the new window. def new_window # get a handle if one exists aa = Win32API.new("user32", "GetForegroundWindow",[] , 'L') hwnd = aa.call if (hwnd) # yes there is a popup return Watir::IE.attach(:hwnd, hwnd) else return nil end end
if (ie2=new_window) ie2.button( ).click end Thanks. Wesley Chen. On Fri, Jan 9, 2009 at 2:42 PM, asheesh misra <asheeshmisr...@gmail.com>wrote: > ipt code opens a new browser window (withou --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---