How to generate Form Database using ranorex

Ask general questions here.
arishahsan
Posts: 26
Joined: Thu Jan 18, 2007 12:04 pm

How to generate Form Database using ranorex

Post by arishahsan » Mon May 14, 2007 11:03 am

I have a form database which contain all the detainls of form and control name.This form was devloped manually.
So now I want to devlop it automatically.
So do u have any idea to implement it using ranorex or any other technique?

webops
Site Admin
Site Admin
Posts: 349
Joined: Wed Jul 05, 2006 7:44 pm

Post by webops » Tue May 15, 2007 10:05 pm

I'm sorry, but we don't understand what you exactly mean.
Could you please explain it more detailed?

Jenö
Ranorex Team

arishahsan
Posts: 26
Joined: Thu Jan 18, 2007 12:04 pm

I mean to say

Post by arishahsan » Thu May 17, 2007 7:54 am

We need Control name of each form object to perform automated testing using Ranorex. Since we dont have all the detals of each form object at a place we need to put ranorex spy on each object to find out its control name. This is really tedious job and I am looking for some other mechanism which can give me the details of each form object at a time.
So do u have any idea about it?

webops
Site Admin
Site Admin
Posts: 349
Joined: Wed Jul 05, 2006 7:44 pm

Post by webops » Thu May 17, 2007 9:05 pm

The following code reads all top-level forms and prints out the handle, location, text and control name of them:

Code: Select all

Console.WriteLine("--------------------------------------");
Console.WriteLine("Read the list of the top-level windows");
Console.WriteLine("--------------------------------------");
Application.GetForms();
foreach (Form topform in Application.Forms)
{
    IntPtr handle = topform.Handle;
    Point  location = topform.Location;
    String text = topform.Text;
    String name = topform.Name;
    Console.WriteLine("Handle={0} Location={1} Text={2} ControlName={3}", 
                                    handle, location, text, name);
}
Jenö
Ranorex Team

arishahsan
Posts: 26
Joined: Thu Jan 18, 2007 12:04 pm

We dont have command

Post by arishahsan » Fri May 18, 2007 7:53 am

We dont have any property like name in Form Class as you have mentioned in above code.

I mean to say following command does not exist.

topForm.Name???

Could you tell me in which build we can get such command?

webops
Site Admin
Site Admin
Posts: 349
Joined: Wed Jul 05, 2006 7:44 pm

Post by webops » Fri May 18, 2007 6:15 pm

Could you tell me in which build we can get such command?
I used RanorexPro 1.1.0.
Some of the properties and functions are only supported in the professional version.

Please see the RanorexNet documentation for details.

Jenö
Ranorex Team