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
How do I get the parent form of a #32770 form?
Re: How do I get the parent form of a #32770 form?
Do you have a valid Ranorex element?
If so you can use MyElement.Element.Parent to get the parent.
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...
Ciege...
Re: How do I get the parent form of a #32770 form?
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?
Re: How do I get the parent form of a #32770 form?
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...
Ciege...
Re: How do I get the parent form of a #32770 form?
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
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