Page 1 of 1

Identification Issues on Testrun

Posted: Thu May 09, 2019 1:15 pm
by dominik_F
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

Re: Identification Issues on Testrun

Posted: Fri May 10, 2019 8:55 am
by odklizec
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 ;)

Re: Identification Issues on Testrun

Posted: Mon May 13, 2019 9:14 am
by dominik_F
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)

Re: Identification Issues on Testrun

Posted: Mon May 13, 2019 9:40 am
by odklizec
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.

Re: Identification Issues on Testrun

Posted: Mon May 13, 2019 12:08 pm
by dominik_F
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!

Re: Identification Issues on Testrun

Posted: Mon May 13, 2019 12:12 pm
by odklizec
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.