Hi,
I can't reproduce the bug you described. Please try the following examples.
You can read all forms by classname as below:
Code: click into code to enlarge
Application.GetForms();
foreach (Form TempForm in Application.Forms)
{
if (TempForm.Element.Class == "WindowsForms10.Window.8.app.0.378734a")
{
Console.WriteLine("form found: " + TempForm.Text);
}
}
If you want to find the first form by it's classname use the FindFormClassName() method:
Code: click into code to enlarge
Form TempForm = Application.FindFormClassName("WindowsForms10.Window.8.app.0.378734a") ;
if (TempForm != null)
{
Console.WriteLine("form found: " + TempForm.Text);
}
Gabor
Ranorex Team |