Mapping dynamic UI elements | Ranorex
Help CenterUser GuideMapping dynamic UI elements

Mapping dynamic UI elements

If software is based on dynamic content it is typically based on dynamic identifiers. This might lead to problems in object recognition as these identifiers will be newly generated every time an element will be displayed. One way to overcome this challenge is to manually adapt the repository after recording a test scenario which of course is very time-consuming. The recommended way of handling dynamic content is to use RanoreXPath weight rules to optimize the object recognition for specific dynamic frameworks.


In this chapter

    What are RanoreXPath weight rules?

    A path weight rule sets the weight of a specific attribute for a specific capability meeting a set of defined conditions. The weight will be used when building up the RanoreXPath. The attribute with the highest weight and a value other than empty will be taken for the identification of the UI element.

    The RanoreXPath Weight Rules can be accessed via the ‘RanoreXPath Weight Rules’ editor (‘Settings -> Advanced -> Edit Path Weights’ or ‘Ranorex Spy -> Edit Path Weights’).

    Using the RanoreXPath Weight Rules can assist you in automatically creating a robust repository which is the base of a robust test automation framework.

    How to add your own RanoreXPath weight rule

    You can find a detailed description of how to add your own RanoreXPath Weight Rule in the blog post Automated Testing and Dynamic IDs. You can also share your own rules with the Ranorex community. Just contact us through the Support Query and include your Weight Rule and a short description of it.

    How to add shared RanoreXPath weight rules

    Open ‘RanoreXPath Weight Rules’ editor from settings dialog (Settings -> Advanced -> Edit Path Weights). Copy the specific XML rule from below and paste it to ‘RanoreXPath Weight Rules’ Dialog.

    Rule library

    RxWinForms ControlNet11 Classnames

    RxWeb YUI (Yahoo User Interface Library)

    RxWeb JS Frameworks (ExtJS, Sencha, Ozone Widget ,…)

    RxWeb jQuery


    RxWeb GWT

    RxWeb MS Dynamics CRM

    RxWin32 Random Control IDs