Identification Issues on Testrun

Ranorex Studio, Spy, Recorder, and Driver.
dominik_F
Posts: 15
Joined: Thu May 09, 2019 10:03 am

Identification Issues on Testrun

Post by dominik_F » Thu May 09, 2019 1:15 pm

Hi,

Ranorex has issues identifying some Elements within the AUT when running the recorded test (C# Application running with .NET4.6)
During recording or when using XPath, Ranorex quickly identifies the desired elements and those elements are also within the repository.
I tried validating and clicking the "cmbContact" and the buttons "btnCall" (see attachment)

The strange thing is, Ranorex always puts these elements into a subfolder which contains elements of a overlay that is invisible per default (and is basically placed above the problematic area but is "collapsed" per default).
I already tried tinkering around with the Quantile Threshold (tried 0%, 50% and 100%) to see if the identification then works.
The attached snapshot contains several objects that are always visible but cannot be found when running the test.


If you need further files or more Elements in the snapshots, please let me know.

Thanks in advance and best regards
Dominik
You do not have the required permissions to view the files attached to this post.

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

Re: Identification Issues on Testrun

Post by odklizec » Fri May 10, 2019 8:55 am

Hi,

At first, please update your existing version of Ranorex with most recent 9.0.1. Initial 9.0.0 contained several critical bugs, which are fixed in 9.0.1. So it's definitely better to use this version over 9.0.0. It may not fix your problem, but it's worth a try ;)

At next, could you please post an example of repository xpath, which typically fails during test run? Also, the problem happens on the same computer, where the failing xpaths were recorded?

I can't comment the overlay thing, which is visible in snapshot you posted and which blocks the selection of input in UI preview. But this overlay should not be the cause of your problem in runtime. So please post the failing xpath (as you have it in repo). But first of all, please update Ranorex ;)
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

dominik_F
Posts: 15
Joined: Thu May 09, 2019 10:03 am

Re: Identification Issues on Testrun

Post by dominik_F » Mon May 13, 2019 9:14 am

Hi,
thanks for the response and sorry for forgetting to add the xpath.

I have updated ranorex to 9.0.1 but unfortunately it didnt change the outcome.

When reproducing it, i saw that the Spy also cannot find the element after it being automatically added during a recording or after tracking the element and adding it to the repository.

When tracking in spy, it shows the following path (which seems logical and to be correct)
/form[@title='mobiles Festnetz']/?/?/container[@automationid='ControlArea']/?/?/button[@automationid='btnCall']

after adding the tracked element to the repository (or after recording a click onto the element) it shows this path in the repo:
/form[@processname='MobilesFestnetz']/container[1]/container[11]/?/?/button[@automationid='btnCall']


The buttons all are placed in the "ControlArea", in the Repo it is saved into "container[1]/container[11]" (which is the settings page, and is an overlay)

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

Re: Identification Issues on Testrun

Post by odklizec » Mon May 13, 2019 9:40 am

Hi,

Thanks for the xpaths. So the indexes are most probable cause of your problems in runtime. I think you can easily remove them or replace the recorded xpath with the originally tracked?

I don't know why the Spy shows one xpath, and when saved/recorded to repo, the xpath is different? My best guess is that standalone Spy uses different settings than Studio? You can export settings from standalone Spy and import them in Studio.
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

dominik_F
Posts: 15
Joined: Thu May 09, 2019 10:03 am

Re: Identification Issues on Testrun

Post by dominik_F » Mon May 13, 2019 12:08 pm

Hi,

where can I export and import these settings?
Everything runs with default settings though, so i doubt that would change much.

I created the folder manually and after some tinkering i got the base path correct. After that Elements were automatically put into that folder after being tracked.
The Elements now are found and seem to work.

Thanks for your time and help!

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

Re: Identification Issues on Testrun

Post by odklizec » Mon May 13, 2019 12:12 pm

Hi,

You can find import/export buttons in Studio/Spy Settings dialog...
Settings_Export.png
If you want to find what's different in Studio and Spy settings, export settings from both apps and simply compare them ;) I guess there will be some differences affecting xpath construction.
You do not have the required permissions to view the files attached to this post.
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