Can't Identify Objects in Sub App on 2nd Launch

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Can't Identify Objects in Sub App on 2nd Launch

Post by Hondo » Thu Dec 22, 2016 12:03 am

Hey Gang,
Just checking with the knowledge base.

AUT = Windows WPF App.
In the normal work flow, there are a number of dialogs..that are seen as separate apps by Ranorex.
The UI Maps for all apps are nice and tidy and have no problem identifying objects.

During execution of a Test.rxrec:
On first launch of the dialog app., can identify all objects exactly as they're mapped. Works great.

On second launch of the dialog app. (in same test execution) fails..cant' find the objects.

The test stops.
Access the Repository and can highlight all the objects in dialog app. again, no problem.

I've double/triple checked the XPaths on the dialog app is exactly the same on both launch instances.
I've tried WAITS.
I've tried DELAYs.

Work around on the 2nd pass has been to switch to issuing Key Sequences to get focus on a control and then do stuff. This works fine.

But what the heck!?
Any ideas would be appreciated.

p.s. n' NO I cannot send a snapshot to any one ever. :mrgreen:

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Can't Identify Objects in Sub App on 2nd Launch

Post by Hondo » Thu Dec 22, 2016 12:18 am

p.s. By "Sub App" I mean Sub Assembly.

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Can't Identify Objects in Sub App on 2nd Launch

Post by asdf » Thu Dec 22, 2016 7:47 am

Hi Hondo,

It seems that the information of the form gets cached and this might cause Ranorex to not finding the element again. Try to turn off the folder caching for this specific element.
Therefore, right click on the parent element of the element in question in the repository and open the properties. Afterwards, please set “Use Cache” in the properties to false.
UseCache.png
UseCache.png (13.27 KiB) Viewed 763 times
I hope this helps.

Kind regards,
asdf
Last edited by asdf on Fri Dec 23, 2016 9:03 am, edited 1 time in total.

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

Re: Can't Identify Objects in Sub App on 2nd Launch

Post by odklizec » Thu Dec 22, 2016 8:22 am

Hi,

If asdf's suggestion does not help, there is not much else we can suggest without at least snapshots, problematic xpath and EXACT error message you are getting. If the problem occurs again, I would suggest to create a snapshot, both before and after the issue and compare them.
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

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Can't Identify Objects in Sub App on 2nd Launch

Post by Hondo » Thu Dec 22, 2016 7:25 pm

asdf wrote:Hi Hondo,

It seems that the information of the form gets cached and this might cause Ranorex to not finding the element again. Try to turn of the folder caching for this specific element.
Therefore, right click on the parent element of the element in question in the repository and open the properties. Afterwards, please set “Use Cache” in the properties to false.
The attachment UseCache.png is no longer available
I hope this helps.

Kind regards,
asdf
asdf you rock, many thanks!

Looks like that has resolved the issue (on at least one of the dialogs). I'll apply it to the rest of 'em and see, but it's looking good. 8)

odklizec: in an effort to meet you part of the way here is the pic of the MAP involved.
mapCfgShell.PNG
mapCfgShell.PNG (18.38 KiB) Viewed 752 times
I found all the ROOTED FOLDERS I created, already had the "Use Cache" Property set to FALSE..
But the top level application ID MAP was set to TRUE.
Set that one to False too and yowza.. worky worky.

Thanks all!