Ranorex

Can we Identify A new form by Its Control Name

 
Post new topic   Reply to topic    Ranorex Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
arishahsan



Joined: 18 Jan 2007
Posts: 26

PostPosted: Wed Jan 31, 2007 8:04 am    Post subject: Can we Identify A new form by Its Control Name
I have to verify that the Opened form is the expected form or not and for that I am using the Control Name of the form but when I am using
NewForm = Application.FindFormTitle("FormTitle");
NewForm.FindControlName ("Control Name Of the New Form");
I am always getting null
so could u tell me how to verify a form by its Control Name
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Wed Jan 31, 2007 9:49 pm    Post subject:
The function form.FindControlName searches the child control with the specified name in the form, but do not return the control name of the form. You can use the form.ControlName property only in the next version V1.1.0.

Use the ClassName property in V1.0.0 to verify the form:

Code: click into code to enlarge
if (form.Text != "Form title" || form.ClassName != "Class name")
{
    Console.WriteLine("ERROR: invalid form ...");
    return 1;
}

Jenö
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> General Questions All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum