From: mully Date: 2007-01-18T00:25:05+09:00 Subject: Re: Attach to running IE instance without watir? Geoff Cheshire wrote: > Hi all, > > I've done the Google thing for several days and I'm hitting a blank. > I'm wondering if there's a way to attach to a running IE process (on > Windows) by using win32ole alone. I can do it with watir, ie = > Watir::IE.attach(:url, url), but I may need to do this on platforms that > don't have watir installed. > > Thanks in advance for any pointers, > Geoff > > -- > Posted via http://www.ruby-forum.com/. IE objects are included in the Windows collection of the Shell object, so you could do something like the following (code not tested): shell = WIN32OLE.new('Shell.Application') shell.Windows.each do | window | if window.Document.Title == 'Your Title Here' ie = window end end Mully