Re: [Wtr-general] Controlling IE popups with stock Watir: simplest way?

2007-05-19 Thread Brian Marick
I played around with win32-utils code, but I was getting odd results. (It appeared that the fork() was really exec()ing the program in a subprocess, rather than continuing the subprogram from the point of the fork.) So I went back to popen. I ran into a further problem. One button press

Re: [Wtr-general] Controlling IE popups with stock Watir: simplest way?

2007-05-19 Thread Chris McMahon
You might be interested in my venerable Perl controller below. It launches a ruby script using system(1,), which returns control to the calling process. A short explanation of how system() does this is here: http://perlmonks.org/?node_id=547218 use warnings; use strict; use Win32::GuiTest

Re: [Wtr-general] Controlling IE popups with stock Watir: simplest way?

2007-05-17 Thread Brian Marick
On May 16, 2007, at 11:43 PM, Bret Pettichord wrote: 3. Have the parent process spin, waiting for that file to be created, then continue. I wonder whether this is really what is happening. My guess is that it is blocked... [...] I don't think you actually need to have the file polling

Re: [Wtr-general] Controlling IE popups with stock Watir: simplest way?

2007-05-17 Thread Bret Pettichord
Brian Marick wrote: I'll check it out. The only advantage over using popen is that you don't have to have an executable ruby file (and know where to find it). You can just require a watcher file and do the work without any implicit or explicit exec. I seem to remember seeing a

Re: [Wtr-general] Controlling IE popups with stock Watir: simplest way?

2007-05-16 Thread Chris McMahon
And here's the watcher script: def initialize(title) @autoit = Watir.autoit @title = title end I don't know how interested you'd be, but if you'd like to try to build a watcher with a Ruby GuiTest instead of autoIt, I'd be interested in what happens:

Re: [Wtr-general] Controlling IE popups with stock Watir: simplest way?

2007-05-16 Thread Bret Pettichord
Brian, Thanks for your detailed report. As you no doubt have realized, Watir's support (if it can be called that) for popups is none too good: awkward and often unreliable. So your efforts are much appreciated. Personally, I haven't had to deal with popups in my scripts, mostly finding ways to

Re: [Wtr-general] Controlling IE popups with stock Watir: simplest way?

2007-05-16 Thread Chris McMahon
I have been looking at the win32utils set of gems on rubyforge lately. The win32-process gem includes a windows implementation of fork that may be promising. I looked at this some time ago, but it turned out be really stupid. Sorry, I don't remember the details, but it quickly becomes clear