Skip xpath in ranorex and just identify objects with names??

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
fimo420
Posts: 55
Joined: Wed Jun 20, 2012 9:49 am

Skip xpath in ranorex and just identify objects with names??

Post by fimo420 » Mon May 11, 2015 7:54 am

Hi,

I was wondering if its possible to skip xpath totally in ranorex and just make it identify the objects based on items names?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3921
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Skip xpath in ranorex and just identify objects with names??

Post by odklizec » Mon May 11, 2015 8:02 am

Hi,

Could you be a bit more specific about what exactly you want to achieve? You can skip most of the elements in the xpath, and leave only the attributes you want (like .//button[@innertext="button name"]), but it could make the search for elements significantly slower and results may be not unique.

And of course, you can always use repository name as object reference. But again, we need more details about the problem you want to solve. Also, please let us know the Ranorex version you are using.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

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

Re: Skip xpath in ranorex and just identify objects with names??

Post by krstcs » Mon May 11, 2015 3:01 pm

Ranorex is DESIGNED around using XPath to identify objects. Even if you only use the name of an element to identify it, you will still need to use XPath to identify the objects using the @name attribute.

Once you learn how to use XPath, you won't want to use anything else, it is very powerful.
Shortcuts usually aren't...