Ask general questions here.
-
atom
- Posts: 357
- Joined: Sun Dec 07, 2008 11:14 pm
- Location: Dublin, Ireland
Post
by atom » Fri Feb 13, 2009 1:57 pm
Hiya
I want to get the process Id of the owner of a dialog:
e.g.
Dim objForm As ranorex.Form = "/form[@Class='#32770']"
How can I get the ProcessId from the Form object ?
-
Support Team
- Site Admin

- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
-
Contact:
Post
by Support Team » Fri Feb 13, 2009 2:54 pm
Just cast your form object to "Ranorex.NativeWindow" and then access the ProcessId property.
(you will need a Ranorex.Win32Plugin.dll reference for this)
-or-
use objForm.Element.GetAttributeValue("processid")
Michael
Ranorex Team
-
atom
- Posts: 357
- Joined: Sun Dec 07, 2008 11:14 pm
- Location: Dublin, Ireland
Post
by atom » Fri Feb 13, 2009 2:58 pm
Ok thanks
GetAttributeValue ... has no documentation about what the attibute name can be, what are the possible values ?
Cheers
-
Support Team
- Site Admin

- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
-
Contact:
Post
by Support Team » Fri Feb 13, 2009 3:21 pm
That depends on the element. You can use all attributes visible in the spy "overview" tab.
Hoever, we recommend using the adapters. A list of all available adapters (e.g. Form, NativeWindow) is available in the API doc, Ranorex namespace
Michael
Ranorex Team
-
atom
- Posts: 357
- Joined: Sun Dec 07, 2008 11:14 pm
- Location: Dublin, Ireland
Post
by atom » Fri Feb 13, 2009 3:36 pm
Ok thanks for info