Ranorex

Difference between Control and Element

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



Joined: 20 Jan 2008
Posts: 1
Location: Hyderabad

PostPosted: Sun Jan 20, 2008 5:26 pm    Post subject: Difference between Control and Element
Hi,

I am new to Ranorex. Can anybody please explain me the diffrence between Control and Element? Are they same representing diffrent set of attributes? Why Ranorex need both? Please explain me some basic things about these two.

Thanks & Regards,
Srinivas Kolla.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 344

PostPosted: Mon Jan 21, 2008 11:50 am    Post subject:
The short answer:
Every control is made up of a number of smaller elements. Elements are the atoms and controls the molecules of a graphical user interface.

The longer answer:
Controls are the primary Windows GUI objects each identified at runtime by a window handle. Every type of control enables some other kind of user interaction at a different level of complexity, e.g. a label just shows some information whereas the more complex ListView may also be used to select an item or display its items in various styles.

The more complex controls (just like the ListView) may be divided into smaller GUI objects that we call elements. An element can, for example, identify the column headers in a ListView or a distinct ListView item. Every element is assigned a role, e.g. "ListItem" or "ColumnHeader", out of a predefined list of possible roles that describe how the user can interact with an element.

Every control has a corresponding element object, too. And both controls and elements can contain child GUI objects. Thus, both controls and elements constitute trees of GUI objects, where the element tree has a finer granularity than the object tree.

So, in order to automate GUIs you can either use the control or the element approach, but usually you will need both of them to get everything done. E.g. searching in the control tree is much more effecient than searching for elements, because of the smaller number of controls. Then again you will need to use elements to click the column header of a ListView.

Regards,
Alex
Ranorex Support Team
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