Hello Experts,
I’m new with renorex and want to evaluate it. At first of all I would like to say that it’s a very cool tool!
I downloaded the last release and try the sample .Net Testing -> Samples -> Visual Studio1. There is an example which works with calc.exe. After red that I build my own WindowsApplication with 3 Controls.
After the follow conditional statement the form contains all controls of the calc.exe application.
“form = Application.FindFormClassName("SciCalc", 1, true, 5000)”
Tried the same with my own application and own class name my form contains no controls.
Have someone any ideas?
Best regards,
Tim
Control problems
Control problems
Last edited by tschi2001 on Tue Feb 19, 2008 4:53 pm, edited 1 time in total.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Are you using .NET / Windows Forms for your Application?
If so, your application probably has
"WindowsForms10.Window.8.app.0.b7ab7b"
as class name. This is not unique and other applications can have the same
class name.
So probably your problem is that you find another (invisible) form which has no controls.
If possible, you should search by title. If this is not possible for some reason, you can collect multiple instances (using the FindFormClassName() instance overload) and try to retrieve the Name property to check if it is really your application.
The Spy displays the instance number along with the class name:
WindowsForms10.Window.8.app.0.b7ab7b #2
Note that the instance number is likely to change when restarting the application, as it depends on which applications you have running;
We recommend not to use instances for Forms if possible.
Michael
Ranorex Support Team
If so, your application probably has
"WindowsForms10.Window.8.app.0.b7ab7b"
as class name. This is not unique and other applications can have the same
class name.
So probably your problem is that you find another (invisible) form which has no controls.
If possible, you should search by title. If this is not possible for some reason, you can collect multiple instances (using the FindFormClassName() instance overload) and try to retrieve the Name property to check if it is really your application.
The Spy displays the instance number along with the class name:
WindowsForms10.Window.8.app.0.b7ab7b #2
Note that the instance number is likely to change when restarting the application, as it depends on which applications you have running;
We recommend not to use instances for Forms if possible.
Michael
Ranorex Support Team
Hello,
Yes I use .Net.
After used your class name and thread.sleep function my application going well.
My code looks like this:
Application.Start("WindowsApplicationGUITest.exe");
Thread.Sleep(5000);
form = Application.FindFormClassName("WindowsForms10.Window.8.app.0.b7ab7b");
If I didn’t use the sleep function, my code was faster as the started .exe application and the form variable get a null value.
Thanks a lot!
Yes I use .Net.
After used your class name and thread.sleep function my application going well.
My code looks like this:
Application.Start("WindowsApplicationGUITest.exe");
Thread.Sleep(5000);
form = Application.FindFormClassName("WindowsForms10.Window.8.app.0.b7ab7b");
If I didn’t use the sleep function, my code was faster as the started .exe application and the form variable get a null value.
Thanks a lot!