I made an application in VS2005 to test ranorex, for e.g I couldn't use the Form.FindClassName("Form1") I hade to use Form.FindClassName("WindowsForms10.Window.8.app.0.378734a"). Is there a possibility to make the class name visible?
Thanks
Dan
Recognition of the Class Name
-
- Certified Professional
- Posts: 74
- Joined: Mon Aug 14, 2006 7:17 pm
- Location: CH
The class name you see in RanorexSpy is not the name of the class in your source code.
Handle, Class name and ControlId are old properties of a window.
See also: http://windowssdk.msdn.microsoft.com/en ... 32596.aspx
Use these properties only if you want to automate an old windows application.
In .NET applications the ControlId is different every time you launch the form, so you cannot use this as your identifier. The class name is also dynamically generated.
Use the Control name property to find a control in a .NET application.
See also: http://msdn.microsoft.com/library/defau ... wforms.asp
Jenö Herget
Ranorex Team
Handle, Class name and ControlId are old properties of a window.
See also: http://windowssdk.msdn.microsoft.com/en ... 32596.aspx
Use these properties only if you want to automate an old windows application.
In .NET applications the ControlId is different every time you launch the form, so you cannot use this as your identifier. The class name is also dynamically generated.
Use the Control name property to find a control in a .NET application.
See also: http://msdn.microsoft.com/library/defau ... wforms.asp
Jenö Herget
Ranorex Team
You can use the Name of the Form, we have no Application.FormFindName at the moment, but you can find the Form by Name easily as follows:...what property should I use for identifier?
Code: Select all
foreach (Form form in Application.Forms)
{
if (form.Name == "SearchedForm" )
{
form.Activate();
break;
}
}
Ranorex Team