Page 1 of 1

How to click to Excel form controls button

Posted: Thu Jan 10, 2019 7:47 am
by nguyen.tung
Hi

I'm new in Ranorex.

I'm using Ranorex like an RPA tool to test an old excel app and get this problem.
I can recognize picture or tangle object in excel but cannot recognize form control button which have reference to an macro function (like attached image)
error.png
When test run, the mouse don't click to form control button like I want, it clicked to other place.
Can't anyone help me how to fix this problem.

Thanks

ps: sorry for my poor english

Re: How to click to Excel form controls button

Posted: Thu Jan 10, 2019 8:48 am
by odklizec
Hi,

Please upload a Ranorex snapshot (NOT screenshot) of the problematic excel file. Even better, if possible, please upload the excel file itself. Thanks.

BTW, I just tried to track a form button, created in newly made excel file (most recent office 365) and the button is correctly tracked via Ranorex. The only problem is, that the button is identified as a picture, with no relevant info available (not even button name). It's recognized that way even in MS Inspect tool. So there is unfortunately nothing you or Ranorex can do about this.

Re: How to click to Excel form controls button

Posted: Tue Jan 15, 2019 2:33 am
by nguyen.tung
Hi

Sorry for my bad description. Let me describe again.

In the left screenshot, when ranorex spy the "rectangle shape button", it can track the button ONLY (the red line around the button).
But in the right screenshot, when ranorex spy the "form control button", it cannot track the button itsefl but the hole screen (the red line around the workbook). I believe that when run the test, ranorex will click on the point base on the relative coordinate of the recognized object (which is the workbook's screen area).
-> The problem occur when I run the test in difference PC with difference screen size. Ranorex click on the wrong point when run the test or can't click on the button if it was hided due to the small screen size.

By the way, I uploaded the excel file (which have only one form control button)
I'm using Windows8 64 bit with Office 2013 and Windows10 64bit with Office 2016, all of them have same problem.
Ranorex version: 8.3.2

Re: How to click to Excel form controls button

Posted: Tue Jan 15, 2019 9:54 am
by odklizec
Hi,

Well, I'm afraid, it works for me? So it must be something related to your PC?
ExcelButton.png
I'm on Win 10 Pro, Office 365 and Ranorex 8.3.2.
Have you tried to add Excel form to GDI capture list?
GDICaptureList_Excel.png

Re: How to click to Excel form controls button

Posted: Tue Jan 15, 2019 10:58 am
by nguyen.tung
Thanks for your reply, but can you try it on PC which have office 2013 or 2016 ?
My project working on Office 2016 so I can't update to Office 365 to test this problem.

Re: How to click to Excel form controls button

Posted: Tue Jan 15, 2019 11:02 am
by odklizec
I'm sorry, I can't. I don't have Office 2013/16 anywhere around. But have you tried what I suggested about GDI capture list? Anyway, even with Office 365, all I'm getting from spy, is just a picture, with no usable identification attributes. So the button could be identified only by its index, which is far from optimal solution.

Re: How to click to Excel form controls button

Posted: Tue Jan 15, 2019 11:45 am
by nguyen.tung
I tried GDI capture list but it not fix the problem, and it seem that office 2013/16 has difference object construct with office 365 (see uploaded snapshot)
error2.png
It has "picture retangle" like office 365 but sky can't track that object, it always track the parent object "tabpage" (in my internal testing excel app which I can't upload )

Re: How to click to Excel form controls button

Posted: Wed Jan 16, 2019 9:16 am
by odklizec
Hi,

The snapshot you posted apparently contains the button? It's just stored as a picture (the same as in my case). So all you have to do is to (manually) add its xpath to repository.

I don't have a clue why the tracking does not work for you? As the tracking works for me, I can only guess that your problem is either caused by different OS or Office version? It may be something to check by Ranorex support/dev. folks. I would suggest you to contact Ranorex support via their support form...
https://www.ranorex.com/support-query/

Re: How to click to Excel form controls button

Posted: Thu Jan 17, 2019 7:23 am
by nguyen.tung
Hi,

Thank you for you help, I will contact to Ranorex support.