How do I get the parent form of a #32770 form? : General Questions

How do I get the parent form of a #32770 form?

Ask general questions here.

How do I get the parent form of a #32770 form?

Postby Aracknid » Thu Jul 14, 2011 11:30 pm

In my older automation app, I was using a Windows API command 'GetParent', passing in the handle of the #32770 window, getting back the handle of the parent window. So usually this was the IE window in my testing.

Is there a way using Ranorex API to get the parent?

If not, I guess I continue to use the Windos API, and if so is there an easy way to do this exposed by Ranorex?

Thanks,

Aracknid
User avatar
Aracknid
 
Posts: 126
Joined: Tue Aug 10, 2010 4:23 pm
Location: Toronto, Ontario, Canada

Re: How do I get the parent form of a #32770 form?

Postby Ciege » Fri Jul 15, 2011 12:14 am

Do you have a valid Ranorex element?
If so you can use MyElement.Element.Parent to get the parent.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
 
Posts: 965
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

Re: How do I get the parent form of a #32770 form?

Postby Aracknid » Fri Jul 15, 2011 12:34 am

The IE message boxes are shown at the top level of the Spy Tree. Will they have a parent if I use your proposed way?
User avatar
Aracknid
 
Posts: 126
Joined: Tue Aug 10, 2010 4:23 pm
Location: Toronto, Ontario, Canada

Re: How do I get the parent form of a #32770 form?

Postby Ciege » Fri Jul 15, 2011 12:37 am

Well, if Spy shows that they have no parent then... No, no method will give you the parent since there is none...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
 
Posts: 965
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

Re: How do I get the parent form of a #32770 form?

Postby Aracknid » Fri Jul 15, 2011 8:32 pm

I tied to do as you suggested, but it returns the handle of the Host (top of Spy tree).

Instead I added a reference Windows user32.dll and called the function GetParent and it returned the IE Form handle that spawned the #32770 window.

Just as an FYI, I need to know which IE form spawned the #32770 window so I can ensure I'm working with the popup of the IE form I'm testing within instead of another IE form that could be open that popped up its own #32770 window.

Aracknid
User avatar
Aracknid
 
Posts: 126
Joined: Tue Aug 10, 2010 4:23 pm
Location: Toronto, Ontario, Canada


Return to General Questions

Who is online

Users browsing this forum: No registered users and 1 guest