Ethan, Bret thanks both of you guys.

On Oct 27, 4:51 pm, Bret Pettichord <[email protected]> wrote:
> There is a "page_container" instance variable that will contain a
> reference to the browser, or the frame, if the object is in a frame.
>
> Bret
>
> Yuriy wrote:
> > I have a custom click method in Element class which use pure Win32API
> > call and needs the IE window to be in input focus. When I ran the
> > scripts on remote desktop(and reduce remote desktop window) it looses
> > its input focus so I need to bring the target IE window to front in
> > order to make it working correct. But...it appeared that workaround
> > wouldn't help :) - I gave it a try but it didn't work out. I also
> > tried to set webserver on the remote machine and run the script by
> > HTTP-request without using remote desktop. Though this didn't help
> > either because remote PC is locked when the scripts are running(I mean
> > the Ctrl+Al+Del lock) and has no proper input focus either. So now I
> > need to release the lock somehow before start running the script...
> > BTW has anyone released the lock by AutoIt or something before?
>
> > On Oct 26, 7:27 pm, Ethan <[email protected]> wrote:
>
> >> For me, I was working around problems I was having with FileField#set in
> >> IE8, and I ended up just rewriting the #set method. For my implementation, 
> >> I
> >> needed the hWnd of the FileField's browser, so I just iterated up through
> >> the @containers to find the browser.
>
> >> -Ethan
>
> >> On Mon, Oct 26, 2009 at 13:09, Charley Baker 
> >> <[email protected]>wrote:
>
> >>> Good question, I'm actually somewhat curious as well as to the use case. 
> >>> :)
>
> >>> -c
>
> >>> On Mon, Oct 26, 2009 at 11:07 AM, Paul Rogers <[email protected]> wrote:
>
> >>>> can you explain why you need this?
>
> >>>> Paul
>
> >>>> On Mon, Oct 26, 2009 at 9:46 AM, Yuriy <[email protected]> wrote:
>
> >>>>> Thanks a lot, Ethan!
>
> >>>>> On Oct 26, 4:33 pm, Ethan <[email protected]> wrote:
>
> >>>>>> Unfortunately, there doesn't seem to be. I have run into this, and what
>
> >>>>> I
>
> >>>>>> ended up doing was to iterate up through the containers until I found
>
> >>>>> the
>
> >>>>>> browser. something along the lines of:
>
> >>>>>> browser=some_div
> >>>>>> while browser && !browser.is_a?(Watir::IE)
> >>>>>>   browser=browser.instance_variable_get('@container')
> >>>>>> end
>
> >>>>>> pretty ugly.
>
> >>>>>> On Mon, Oct 26, 2009 at 08:30, Yuriy <[email protected]> wrote:
>
> >>>>>>> Hi all,
> >>>>>>> is there any way I can get browser instance from inside an element?
> >>>>>>> Here is what I mean by that:
> >>>>>>> ie_instance = IE.new
> >>>>>>> some_div = ie.div(:any, 'any')
> >>>>>>> some_div.a_method_to_get_browser_instance  # <--- this is an assumed
> >>>>>>> method which would return the ie_instance
>
> >>>>>>> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to