Page 1 of 1

data grid - ranorex spy unable to click individual items

Posted: Thu Jun 27, 2019 1:56 pm
by neeshpal
Hello
My app is desktop app where UI is built in C++. I have a window and inside that window there is a grid and there's data in that grid. Ranorex can find window. But spy is unable to click on each grid item. When I try it , it just gives me back the main window and not individual items.

I see in the tree structure on left hand side on spy that there is a List item under this main window but there is only one level of hierarchy in which there are three more items (2 ListItem and one ScrollBar) and thats it.

Question: Give this scenario , is it possible to get to the grid programmatically even if spy couldn't click on individual grid items? If yes how can we achieve this? If no, are there any options to try?

Thank You

Re: data grid - ranorex spy unable to click individual items

Posted: Thu Jun 27, 2019 8:07 pm
by odklizec
Hi,

Without seeing your app or, at very least, Ranorex snapshot (NOT screenshot), it’s impossible to tell anything definitive. But from my experience with such unrecognisable elements, your best hope is most probably GDI capture feature (check this user guide chapter). In other words, there is most probably no other way to obtain data from such element, unless someone implements proper accessibility to tested data grid.

Re: data grid - ranorex spy unable to click individual items

Posted: Fri Oct 18, 2019 8:04 pm
by neeshpal
Thank You for your reply. I tried GDI capture feature , but it is still not recognizing the grid.
Are there any other options that I can try ?

Re: data grid - ranorex spy unable to click individual items

Posted: Mon Oct 21, 2019 9:02 am
by odklizec
Hi,

I'm afraid, if GDI is not working for you, there is most probably nothing you can do about this. The only other option could be adding proper accessibility support to your app/grid. But it could be somewhat tricky (maybe even impossible) if you have no access to grid's source code.

Re: data grid - ranorex spy unable to click individual items

Posted: Mon Oct 21, 2019 2:55 pm
by neeshpal
Actually, when I use 32 bit ranorex spy, GDI is recognizing the grid and gives me an xpath with

Code: Select all

@rawtext
in it. This should do it.
Thank You for mentioning that feature.

Re: data grid - ranorex spy unable to click individual items

Posted: Mon Oct 21, 2019 3:02 pm
by odklizec
Hi,

Good to hear that! Rawtext is exactly what GDI capture returns and it usually works as a last resort. It's not easy to work with rawtexts in very complex UI elements (like grids), but it's better than nothing ;)

Re: data grid - ranorex spy unable to click individual items

Posted: Thu Oct 24, 2019 8:36 pm
by neeshpal
Hello
Using spy, I can recognize element but I am unable to find element when trying through code (VS) . xpath that I get from spy is same as xpath that code is trying

Code: Select all

/form[@title='ClassName']/element[@class='ClassName' and @instance='0']//rawtext[@rawtext='10/24/19 15:02:11']
I also turned on RawText feature like this

Code: Select all

          var plugins = Ranorex.Core.PluginManager.Instance;
            plugins.LoadDefaultPlugins();
            RawTextFlavor.Instance.ClassNames.Add(new Regex("ClassName"));
            RawTextFlavor.Instance.UpdateFromConfig();
Do you see anything missing? how can I make it work ?