Hi,
Amongst other things, RanorexSpy shows me "Class name", "Control name" and "Caption/text". I can see the API in Application to find a form by class name, and by caption text.
However, my application's "Control name" is the key I need to locate its form; how do I do this? It's as if I need Application.FindFormByControlName.
(Caption/text changes too often to be reliable, and the "class name" is junk - anyone know how to set that programmatically?)
Thanks!
DavidD
Find form by "Control name"
Good idea, we will support this function in the next version.david_dawkins wrote:It's as if I need Application.FindFormByControlName.
But you can find the form easily in V1.1.0:
Code: Select all
Application.GetForms();
foreach (Form form in Application.Forms)
{
if (form.Name == "SearchedForm" )
{
form.Activate();
break;
}
}
Ranorex Team
-
- Posts: 6
- Joined: Sat Mar 17, 2007 6:50 pm
Thanks for your reply ; however I have no method Form.Name in the v1.1.0 that I have installed.
Thanks
David D
Intellisense doesn't show it to me, either. The documentation however claims that it should be there.Error 1 'Ranorex.Form' does not contain a definition for 'Name' C:\Program Files\Ranorex-1.1.0\Samples\RanorexVS2005Sample1\Class1.cs 131 25 RanorexVS2005Sample1
Thanks
David D