This article explains how to share weight rules with your team. Sharing rules ensures that everyone on your project identifies dynamic UI elements using the same logic, which maintains consistency across different workstations.
Copy weight rules
You copy your weight rules to a file so other team members can include them into their environment as follows:
- Open the configuration dialog for attribute weights. For more information, see Attribute Weights.
- Select the weight rule you want to share.
- Right-click the weight rule and click Copy. Alternatively, you can use Ctrl + C to copy the rule.
- Paste the content into a text editor of your choice and save the file.
Share the file with other team members. They can use it to create their weight rules in their testing environment.
Paste weight rules
When you receive a weight rules file from a teammate, follow these steps to apply it to your system:
- Open the file and copy the content.
- Open the configuration dialog for attribute weights. For more information, see Attribute Weights.
- Right-click the list of rules on the left panel.
- Click Paste. Alternatively, you can use Ctrl + V to paste the rule.
The new rule appears in your list and influences how Ranorex Studio generates new RanoreXPaths.
Default weight rules
RxWinForms ControlNet11 Classnames
XML
<rule
name="RxWinForms ControlNet11 Classnames"
enabled="True"
capability="nativewindow"
attribute="class"
setweight="0"
conditionsoperator="and">
<condition
source="self"
attribute="class"
match="^WindowsForms10.Window"
negate="False"></condition>
</rule>
RxWeb YUI (Yahoo User Interface Library)
XML
<rule
name="RxWeb YUI (Yahoo User Interface Library)"
enabled="True"
capability="webelement"
attribute="id"
setweight="0"
conditionsoperator="or">
<condition
source="self"
attribute="id"
match="^yui(_d+)"
negate="False"></condition>
<condition
source="self"
attribute="id"
match="^yui-gen.*"
negate="False"></condition>
</rule>
RxWeb JS Frameworks (ExtJS, Sencha, Ozone Widget ,…)
XML
<rule
name="RxWeb JS Frameworks (ExtJS, Sencha, Ozone Widget ,...)"
enabled="True"
capability="webelement"
attribute="id"
setweight="0"
conditionsoperator="or">
<condition
source="self"
attribute="id"
match="^ext-.*d+.*"
negate="False"></condition>
<condition
source="self"
attribute="id"
match="^[a-z]+-d{4}(-[a-z]*(-d*)?)?"
negate="False"></condition>
</rule>
RxWeb jQuery
XML
<rule
name="RxWeb jQuery"
enabled="True"
capability="webelement"
attribute="id"
setweight="0"
conditionsoperator="or">
<condition
source="self"
attribute="id"
match="^ui-id-d+"
negate="False"></condition>
</rule>
RxWeb ASP.net
XML
<rule
name="RxWeb ASP.net"
enabled="False"
capability="webelement"
attribute="id"
setweight="0"
conditionsoperator="or">
<condition
source="self"
attribute="id"
match="^ctl00($|_)(.*($|_))"
negate="False"></condition>
</rule>
RxWeb GWT
XML
<rule
name="RxWeb GWT"
enabled="True"
capability="webelement"
attribute="id"
setweight="0"
conditionsoperator="or">
<condition
source="self"
attribute="id"
match="^gwt-uid-d+.*"
negate="False"></condition>
<condition
source="self"
attribute="id"
match="^isc_.+"
negate="False"></condition>
</rule>
RxWeb MS Dynamics CRM
XML
<rule
name="RxWeb MS Dynamics CRM"
enabled="True"
capability="webelement"
attribute="id"
setweight="0"
conditionsoperator="or">
<condition
source="self"
attribute="id"
match="[a-zA-Z_]+_{([0-9 A-F]+(-)?)+}_d+"
negate="False"></condition>
</rule>
RxWin32 Random Control IDs
XML
<rule
name="RxWin32 Random ControlIds"
enabled="False"
capability="nativewindow"
attribute="controlid"
setweight="0"
conditionsoperator="or"></rule>