Ranorex Blog

Posted by cpreschern on Thursday, April 10th, 2008

Global GUI map for automation with VS.NET

Writing test code based on RanoreXPath is not a big challenge. In fact, it’s always the same procedure. First, find the element within a web page. After that, automate it (click, set value,…). Two simple steps. Nevertheless, the bigger your test code the more structured and well designed it should be.
Read more »

Posted by ahoisl on Friday, April 4th, 2008

Web Automation with Python for .NET

Unlike the traditional Ranorex API, the new Web Automation API is natively provided only for .NET languages. However, there are two easy ways how you can still use Python with Ranorex Web Automation.

Read more »

Posted by jherget on Saturday, March 1st, 2008

Making 3rd party controls fit for automation

Automating 3rd party controls can be a hard work. If the control does not support standard mechanisms like windows messages or active accessibility, it cannot be automated without adding some code to the application under test. But how does this trick work?

Using .NET, it’s very simple. You create a new class in the application under test, which inherits from the control class you want to automate and add some properties or methods you need for automation. Be sure that you instantiate the new class in the form designer instead of the old one.

The new version of Ranorex (V1.4 or higher) allows you to get/set properties and call methods of objects from a test application. This technique can be used with all kinds of 3rd party or custom .NET controls. Read more »

Posted by cpreschern on Tuesday, February 26th, 2008

“Design for Testability” - Smooth 3rd party control automation

GUI automation always depends on the type of used controls and technologies within applications. An increasing use of 3rd party controls in applications also makes GUI automation more and more addicted to identification information provided by the 3rd party control. In most cases providers of 3rd party controls support enough information to get a control’s elements identified and automated. Nevertheless, there are sometimes more complex ways required to simulate user actions. That type of test automation code is not that “readable” as we would like to have.

Ranorex V1.4 supports accessing properties and methods of .NET derived controls. Following “Design for Testability” sample explains the way of making testing more comfortable. By using the 3rd party UltraTree control from Infragistics the example describes how to access user defined methods for test automation. Read more »

Posted by cpreschern on Wednesday, February 20th, 2008

Element based Automation of 3rd Party Infragistcs controls

Automation of 3rd party controls often depends on the type of information provided by the controls manufacture. Infragistics controls allow several ways of element identification. This example describes how to access cells of an Infragistics DataGrid control of the demo appllication “MyStylableApplication”. To get controls like this automated it’s always advisable to analyze applications with RanorexSpy. Working with Ranorex Elements means always to work with following properties provided by RanorexSpy: Read more »

Posted by ahoisl on Friday, February 15th, 2008

Differences between control and element

Every control is made up of a number of smaller elements. Elements are the atoms and controls the molecules of a graphical user interface.

Difference Control Element


Controls are the primary Windows GUI objects which are 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”, from a predefined list of possible roles that describe how the user can interact with an element.

Every control also has a corresponding element object, 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.

Control and Element hierarchy

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. For example searching in the control tree is much more effecient than searching for elements because of the smaller number of controls. Even so, you will still need to use elements to click the column header of a ListView.

Posted by gherget on Monday, December 17th, 2007

Implementing a User Interface Test Automation Framework in .NET

This article describes how to write an automated user interface test framework based on Ranorex (a GUI automation framework supporting .NET). The test framework should give testers the ability to easily check the features of an application. The Calculator application is used as dummy program for an application being tested. Read more »