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 -~----------~----~----~----~------~----~------~--~---
