Oh, good news (about badly written code) ;-)

Paul, how can I attach an IE if I know the window handle? That would
really help. There seem to be no other way to locate the modal IE
window I'm working with.
This does not work:

hndl = wc.getWindowHandle('MyList -- Web Page Dialog', '')
puts hndl
wtitle = wc.getWindowTitle(hndl)
wc.makeWindowActive(hndl)
ie.attach(:title, wtitle)

This code returns an error that there's no window with this title even
though the handle is not -1.

Thanks,
Anna.

On 8/15/05, Paul Rogers <[EMAIL PROTECTED]> wrote:
> winclicker contains some very scary, badly written code. Id try to avoid it 
> if possible.
> 
> You might be able to attach to an embedded browser by using attach - or 
> possibly a modified form of it and attach using the :url ( assuming you know 
> the url of the embedded browser) Im sure you could also do something by 
> fiding the hWnd of the embedding application, and then finding the child hWnd 
> of the browser, and maybe using a modified form of Watir::IE::attach
> 
> Paul
> 
> ----- Original Message -----
> From: Anna Tuisheva <[EMAIL PROTECTED]>
> Date: Monday, August 15, 2005 3:27 pm
> Subject: Re: [Wtr-general] Attaching to an embedded browser
> 
> > Mark, I did not have exactly your problem, but you may want to
> > look at
> > winClicker.rb and its getWindowHandle() method. After you get a
> > handle, you can use something like clickWindowsButton_hwnd() from the
> > same lib to click buttons in it or other methods.
> > This is just a thought. I'm investigating how I can use winClicker
> > with some of windows in my app, and I don't have much experience with
> > it (yet ;-))
> >
> > Anna.
> >
> >
> > On 8/15/05, Mark Hammond <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > HI there
> > >
> > >
> > >
> > > I am trying to attach to n embedded browser. How can I go about
> > doing this?
> > >
> > >
> > >
> > > Thanks
> > >
> > > Mark
> > > _______________________________________________
> > > 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
> >
> 
> _______________________________________________
> 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

Reply via email to