RanorexPath Issue - Flex

Ask general questions here.
JoeR
Posts: 32
Joined: Fri Dec 03, 2010 6:15 pm
Location: Morrisville, NC
Contact:

RanorexPath Issue - Flex

Post by JoeR » Fri Jun 24, 2011 4:52 pm

Below are to partial RanoreXPath from a component in our app. One is the way the path is resolved now using Spy the other is the way the Path looks when it was originally recorded. The main issue is that our development team does not assign container values manually. They let Flex autogenerate them. As say VBOXs or HBOX are added to the screen the generated container ids may change. Is there a way to handle this so that the recordings are not broken when this happens. This is a urgent problem for us.


Path as it currently is:
container[@id='modulesCanvas']/element/container[1]/container[@id='adminDetailsTabs']/container[@id='workRulesPane']
/container[@id='_ResWorkDaysAndHolidays_VBox3']/container[@id='_ResWorkDaysAndHolidays_ResCustomHolidaysForm1']/element/text[@id='itemName']

Path when recording was done:
container[@id='modulesCanvas']/element/container[1]/container[@id='adminDetailsTabs']/container[@id='workRulesPane']
/container[@id='_ResWorkDaysAndHolidays_VBox4']/container[@id='workRulesHolidayForm']/container[@id='_ResCustomHolidaysForm_HBox2']/text[@id='itemName']

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: RanorexPath Issue - Flex

Post by Support Team » Fri Jun 24, 2011 6:19 pm

Hello,

You can tell Ranorex not to use certain attributes to create the RanoreXPath. To do this
  • open the Spy and click on "Edit Path Weights..." on the lower right corner
  • add a new rule and give it a name
  • choose a capability and then the attribute you want to change the weight of
  • give it a weight. 100 is default, above 100 tells Ranorex to rather use this attribute, below 100 tells Ranorex rather not to use this attribute and 0 means "don't use"
  • you should add a rule condition to tell Ranorex when to use this rule, e.g. choose toplevel and then an attribute available for you specific toplevel tree entry (e.g. ProcessName) and give it a value (note: you won't see ProcessName in the drop-down list, because Ranorex does not know, what the toplevel element is in your case. But you can find out using the Spy and then choose an attribute to use as condition)
Regards,
Roland
Ranorex Support Team

JoeR
Posts: 32
Joined: Fri Dec 03, 2010 6:15 pm
Location: Morrisville, NC
Contact:

Re: RanorexPath Issue - Flex

Post by JoeR » Thu Jun 30, 2011 1:14 pm

Thank you for the information. If I edit the path weight in the recorder when I open it does that change only apply to the recording I am getting ready to do or does it apply to all recordings going forward. By that I mean is that changed path weight now the default for all my recordings?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: RanorexPath Issue - Flex

Post by Support Team » Thu Jun 30, 2011 7:27 pm

Hello,

that is addressed by the last point above, i.e. unless you specify a rule condition it will be applied to all the path that Ranorex generates.

Regards,
Roland
Ranorex Support Team