Page 1 of 1

Warning on founding Excel popup ButtonOK

Posted: Thu Jun 20, 2019 9:22 am
by lemoalh
Hi SupportTeam,

I make my first steps in Ranorex and face the following questionning :
My test case open an excel file activate a macro which open a selection popup.
The Ok button is visible, clickable, but, although the tests is successful, the following warnings appear :

00:00.000
Warn Repository
Item 'TransparenceRepository.MicrosoftExcel.Popup_Selection.ButtonOK' could be found using its absolute path, but not using its relative path from the cached element of parent folder 'TransparenceRepository.MicrosoftExcel'. This can happen if either the item search timeout is too small or if items within a rooted folder do not share a common parent element. To fix this problem, first increase the item search timeout. If this does not help, create a separate rooted folder for this item or disable caching for the specified folder.


In attachment, you will find the snapshot and the compressed Ranorex solution.

Do you know how i could make those warnings disapear ?
Thanks in advance
H.

Re: Warning on founding Excel popup ButtonOK

Posted: Thu Jun 20, 2019 1:40 pm
by odklizec
Hi,

I think the problem is too generic xpath for OK button? Button with accessiblename 'OK' is basically system-wide element. At first, have you tried what error suggested (e.g. disabling cache for rooted folder)? Also, I would suggest to add Excel process name to Ranorex whitelist. This should make Ranorex to search the OK button just in the Excel-related dialogs.

Re: Warning on founding Excel popup ButtonOK

Posted: Fri Jun 21, 2019 1:21 pm
by lemoalh
Hi Pavel,

Thanks for the quick answer.
Unfortunately, disabling the "app folder cache" didn't have impact on the warnings.
And Excel is already in the Whitelist, as chrome and explorer for the test to be completed.

You're certainly right when writing the problem is related to a too generic path.
Although, i don't see how to make the path more specific.

The most disturbing is that, when using item highlighting, the button is always find instantly...
I already tried to use SPY to specify the path, but the same path is always registered.

Re: Warning on founding Excel popup ButtonOK

Posted: Mon Jun 24, 2019 3:02 pm
by Support Team
Hello lemoalh,

Thank you for uploading the Ranorex Solution and the Snapshot file. You are using the processname as a parameter in order to find the form element and I assume that this is the reason why this message appears for the OK button. The dialog with the OK button is a separate process, but might also have the processname Excel.

In the Ranorex Snapshot file the RanoreXPath to the OK button is:
/form[@title='Sélection']/button[@accessiblename='OK']

In your repository, the RanoreXPath is
/form[@processname='EXCEL']/button[@accessiblename='OK']

Please create another app folder with the path /form[@title='Sélection'] and move the OK button into the new app folder.

I hope that helps.

Regards,
Bernhard

Re: Warning on founding Excel popup ButtonOK

Posted: Fri Jun 28, 2019 1:43 pm
by lemoalh
Hi Bernhard,

Your recommandations made the OkButton issue disappear ! :)
Thanks a lot for your support !

KR,
H.