xpath issue after upgrade to 3.3

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

xpath issue after upgrade to 3.3

Post by omayer » Fri Jun 15, 2012 12:54 am

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,
Tipu

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: xpath issue after upgrade to 3.3

Post by Support Team » Fri Jun 15, 2012 3:24 pm

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
.
Image

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: xpath issue after upgrade to 3.3

Post by omayer » Fri Jun 15, 2012 3:37 pm

Thank you Markus, How can we use wildcard on rxpth, for [//[email protected]='www.abqa.com']..to // [//[email protected]='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,
Tipu

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: xpath issue after upgrade to 3.3

Post by krstcs » Fri Jun 15, 2012 7:29 pm

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!
Shortcuts usually aren't...

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: xpath issue after upgrade to 3.3

Post by omayer » Sun Jun 17, 2012 11:03 pm

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,
Tipu

Sharath
Posts: 2
Joined: Fri Jun 01, 2012 10:38 am

Re: xpath issue after upgrade to 3.3

Post by Sharath » Mon Jun 18, 2012 12:27 pm

How can we pass $environment Value through test data????????????

Thanks,
Sharath

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: xpath issue after upgrade to 3.3

Post by krstcs » Mon Jun 18, 2012 2:09 pm

@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.
Shortcuts usually aren't...