Identify AUT by processId - How to further record/spy/debug

Ask general questions here.
ddweber
Posts: 2
Joined: Wed Sep 04, 2019 10:13 am

Identify AUT by processId - How to further record/spy/debug

Post by ddweber » Wed Sep 04, 2019 10:29 am

Hello,

i am starting my AUT via 'Run application' action and use the returned processId in a xpath to identify the main-form of my AUT. This is very robust if more then one instance/main-form of the AUT exists and works perfectly in production-tests. (Closing AUT later is done via processId too..)
When i am trying to develop further tests by recording/spying the AUT the processId is not set and so the whole recording/spying fails because the main-form can´t be identified.

Is there a possibility to disable the processId in the xpath while development without messing around with the xpath manually everytime?

Thanks for your answer/help.

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

Re: Identify AUT by processId - How to further record/spy/debug

Post by odklizec » Thu Sep 05, 2019 7:06 am

Hi,

I'm afraid, there is no such option like temp. ignoring part of the xpath under certain conditions. I think you will have to develop/debug your test without processid attribute in the xpath and add it only for the real/full test? Or you may be able to keep it there entire time and add another processid with 'or' operator. Such additional processid should contain regex to match with 'any' number/character (e.g. @processid~'( .*)'). But then you must not forget to remove this attribute before running real test ;) Neither solution is perfect, but it's probably best you can probably do?
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

ddweber
Posts: 2
Joined: Wed Sep 04, 2019 10:13 am

Re: Identify AUT by processId - How to further record/spy/debug

Post by ddweber » Tue Sep 10, 2019 1:24 pm

Thanks for your reply and suggestion :)

It´s a pity that there is no such possibility, because identifying the main form of my AUT via processId made my test much more stable in case of left open istances of the same AUT, for example in case of data-driven tests with multiple iterations.