I try to automate a native windows application. Currently ranorex spy and recorder prefer class, controlid and instance attributes to identify native windows. The application however provides meaningfull windowstext for many objects. I thought I could use the RxWeight plugin to change attribute preference but it doesn't work:
Ranorex.Plugin.RxPathWeights.config
Code: Select all
<rxpathweights>
<rule capability="nativewindow" attribute="controlid" setweight="0" conditionsoperator="and">
<condition source="self" attribute="windowtext" match="[A-Z_\.]+" negate="false"/>
</rule>
<rule capability="nativewindow" attribute="instance" setweight="1" conditionsoperator="and">
<condition source="self" attribute="windowtext" match="[A-Z_\.]+" negate="false"/>
</rule>
<rule capability="nativewindow" attribute="class" setweight="2" conditionsoperator="and">
<condition source="self" attribute="windowtext" match="[A-Z_\.]+" negate="false"/>
</rule>
<rule capability="nativewindow" attribute="windowtext" setweight="3" conditionsoperator="and">
<condition source="self" attribute="windowtext" match="[A-Z_\.]+" negate="false"/>
</rule>
</rxpathweights>
Code: Select all
...tabpagelist/element[@controlid='1004']/element/element[@controlid='59648']/element/tabpagelist/element[@controlid='106' and @class='...' and @instance='0']/element/element[@controlid='65280' and @class='...' and @instance='3']
Code: Select all
.../tabpagelist/element[3]/element/element[2]/element/tabpagelist/element[@controlid='106' and @class='PscSubControl' and @instance='0']/element/element[19]
Kind Regards