Page 1 of 1

xpath issue after upgrade to 3.3

Posted: Fri Jun 15, 2012 12:54 am
by omayer
After upgrade to 3.3. i don't see the entire path for the ojbect in spy, how do I get entire path for the object in spy -
this is how it shows now after upgrade 3.3
/dom[@domain='xx.xx.com']//frameset[#'mainframexxx']/frame[@name='mainrmxx']//input[#'CommandButton']

also, how will i use wild card for path like /dom[@domain~'rm*.*.com']//frameset[#'mainframe*']/frame[@name~'mainrm*']//input[#'CommandButton']



Thank you,

Re: xpath issue after upgrade to 3.3

Posted: Fri Jun 15, 2012 3:24 pm
by Support Team
Hi,

This is because Ranorex now uses the unique id for a faster identification of such web elements.
At the moment it is not possible to use regular expressions and the unique id which is marked with the "#".
Do you have any problems with the new path, or is there a special reason why you want to get the "entire/old" path?

Regards,
Markus
Ranorex Support Team

Re: xpath issue after upgrade to 3.3

Posted: Fri Jun 15, 2012 3:37 pm
by omayer
Thank you Markus, How can we use wildcard on rxpth, for [//dom@domain='www.abqa.com']..to // [//dom@domain='www.ab*.com'].. the reason we do have 6 different test env which all prefix with ab like abdev, abshared, abtest ..., all my existing code had wildcard before upgrade to 3.3
Thank you,

Re: xpath issue after upgrade to 3.3

Posted: Fri Jun 15, 2012 7:29 pm
by krstcs
I have this same issue, and just sent an email to support.

You have taken away functionality by refactoring the RXPaths this way.

We are testing an external application, so we have no control over the design. They cache dialogs and frames, so searching through EVERY dialog and frame (hundreds possible due to the depth of the system) takes longer than the timeouts in some instances.

While I understand that the unique ID tag (#) makes it quicker to identify INDIVIDUAL objects, removing the full path from objects actually makes identification take much longer when there are cached objects that Ranorex has to search through in order to find a specific element.

There should be a way for the USER to control the amount and/or depth of the RXPathing used.

You have caused us to have about TRIPLE the work load due to this change, which is unacceptable.


omayer, as for your wildcard issue, try the following:

</dom[@domain~'www.ab' + $environment + '.com']>

You will have to have $environment set as a test variable and then manage it through test data.

This is how it should have been working before the 3.3 changes anyway. Hope that helps!

Re: xpath issue after upgrade to 3.3

Posted: Sun Jun 17, 2012 11:03 pm
by omayer
Thank you krstcs, this is very helpful, if i knew the xpath changed i could wait until next release or wait for a while.
Thank You,

Re: xpath issue after upgrade to 3.3

Posted: Mon Jun 18, 2012 12:27 pm
by Sharath
How can we pass $environment Value through test data????????????

Thanks,
Sharath

Re: xpath issue after upgrade to 3.3

Posted: Mon Jun 18, 2012 2:09 pm
by krstcs
@Sharath - You would need to create a variable in your repository called 'environment' and then assign it a value through data bindings. See http://www.ranorex.com/support/user-gui ... sting.html for more information on data-driven testing.

You could then change the variable at run-time by passing different values.