Issue Details (XML | Word | Printable)

Key: WTR-312
Type: New Feature New Feature
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Matt Wolfe
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

attach to Embedded IE window

Created: 06/May/09 08:54 PM   Updated: 19/Jan/13 08:40 AM   Resolved: 19/Jan/13 08:40 AM
Component/s: Window Attachment
Affects Version/s: 1.5.0/1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.6.0, 1.6.1, 1.6.2
Fix Version/s: Future

Environment: windows


 Description  « Hide

Currently there is no support (from what I've seen) for attaching watir to an embedded IE window. Several users have had a need for this and I've done some research on the issue but have not yet been able to get a working solution.
What would be nice is to add a new method to watir called something like attach_embedded(how, what)
where how could be :title or :hwnd
and what being the corresponding value

autoit has a function for attaching to an embedded browser and I've tested that it works. Thus, In autoit IE.au3 they have a function which when given a hwnd will return the IE control which if we could do the same thing with watir, we could bind that and control it like a regular browser.

The following has the source for IE.au3, if you look there is a function called __IEControlGetObjFromHWND
which is what I am referring to. Check it out:
http://www.therks.com/autoit/install/Include/IE.au3

A few people have attempted to implement this function but have been unable to call the idispatch interface method that is returned (at least, thats what i think the problem is). Here is the most recent attempt which didnt work in my tests:
http://rubyforge.org/forum/forum.php?thread_id=33188&forum_id=319

I've compiled some useful links about the issue and I'll post them here:

http://groups.google.com/group/watir-general/browse_thread/thread/479a9e9e608c009
http://www.wolfewebservices.com/blog/attaching-watir-embedded-ie-browser
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=8437&group_id=426
http://www.bsalsa.com/ie_tools_auto.html
http://msdn.microsoft.com/en-us/library/dd373605(VS.85).aspx
http://support.microsoft.com/kb/q249232/

http://social.msdn.microsoft.com/forums/en-US/clr/thread/0d2e200d-d39d-453a-ad43-029d2f20d15e/
http://www.nabble.com/write-COM-clients-in-Ruby-td10986533.html

I've also seen some code related to modal dialogs which looks like it may have been trying to accomplish the same thing but I wasn't sure.



Sort Order: Ascending order - Click to sort in descending order