Spy finds no entry in the table

Ranorex Spy, Recorder, and Studio.
i.matveev
Posts: 40
Joined: Thu Apr 11, 2013 1:10 pm

Spy finds no entry in the table

Post by i.matveev » Mon Jun 10, 2013 3:26 pm

The element forms a table. How can I get / set the value of the cell (eg D7). At the same time I can not use the screen coordinates (size of the form may change). I would like to use that cell coordinates.
Image

i.matveev
Posts: 40
Joined: Thu Apr 11, 2013 1:10 pm

Re: Spy finds no entry in the table

Post by i.matveev » Tue Jun 11, 2013 1:44 pm

Help me pls

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

Re: Spy finds no entry in the table

Post by odklizec » Tue Jun 11, 2013 2:05 pm

Hi,

It would be helpful if you post a snapshot file from your app. Here you can learn how to create one...
http://www.ranorex.com/support/user-gui ... files.html

However, even without the snapshot file, I guess you can't access the inside of the table because of no or incorrect implementation of MSAA? Check for example this blog about adding MSAA to custom controls...
http://www.ranorex.com/blog/enabling-au ... s-controls
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

i.matveev
Posts: 40
Joined: Thu Apr 11, 2013 1:10 pm

Re: Spy finds no entry in the table

Post by i.matveev » Tue Jun 11, 2013 2:13 pm

snapshot
Attachments
ElementfpSpread.rxsnp
(600.68 KiB) Downloaded 236 times

i.matveev
Posts: 40
Joined: Thu Apr 11, 2013 1:10 pm

Re: Spy finds no entry in the table

Post by i.matveev » Tue Jun 11, 2013 2:30 pm

2 odklizec
I do not have the skills to change a system designed for testing. My task is to ensure the quality of the system by testing.

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

Re: Spy finds no entry in the table

Post by odklizec » Tue Jun 11, 2013 2:45 pm

As I expected, your app uses a third party control for winforms (FarPoint Spread for Windows Forms). I understand your problem, but there is probably nothing Ranorex folks can do for you? If the control has no or incorrectly implemented MSAA, Ranorex simply cannot recognize the elements inside the control. You (or someone in your company) will have to ask the FarPoint Spread developers to implement the MSAA in their control. It may be possible to implement MSAA to 3rd party controls even without the control's source code, but it's definitely not easy task.

PS: I just tried the demo version of Spread Designer (which also uses spread for winforms) and it exhibits the same problem. So I think it's really missing/incorrectly implemented MSAA in that Spread control.
Last edited by odklizec on Tue Jun 11, 2013 3:02 pm, edited 1 time in total.
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

i.matveev
Posts: 40
Joined: Thu Apr 11, 2013 1:10 pm

Re: Spy finds no entry in the table

Post by i.matveev » Tue Jun 11, 2013 2:59 pm

2 odklizec
As you move through each entry spy displays the information. You think you can not pull out by the methods of C # data from cells?
Image

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

Re: Spy finds no entry in the table

Post by odklizec » Tue Jun 11, 2013 3:19 pm

The AccessibleDescription seems contains the name of actually selected Sheet, position of actually selected Cell (in column/row format starting from 0) and content of actually selected cell. The only way to read content of another cell (via AcessibleDescription of actually selected cell) would be to select a given cell. But I see no way how can Ranorex help you with this if Ranorex is not able to access the individual cells? I think there is no way to do this, but of course, I can be wrong ;)
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

i.matveev
Posts: 40
Joined: Thu Apr 11, 2013 1:10 pm

Re: Spy finds no entry in the table

Post by i.matveev » Wed Jun 12, 2013 8:16 am

I think you can use the coordinates of the upper left corner of the cell, and the cell size, click the middle, enter the value using Presskeys, and the value can be obtained from the field AccessibleDescription parsing the string. Other ideas are absent.
The problem is that I have not found what field contains data about the cell.
  It may be something you tell me? :)
Sorry for my English. Translated test with Google Translate

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

Re: Spy finds no entry in the table

Post by odklizec » Wed Jun 12, 2013 8:50 am

As far as I see, there is no field in the Ranorex spy returning the cell details (pixel position/size) of actually selected cell.

Really, it would be tedious and error-prone task making an automated test without accessible content of the table. The best you can hope for is a combination screen-based recording/playback and validation. Check this tutorial... http://www.youtube.com/watch?v=wwr5ddOe4h0
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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Spy finds no entry in the table

Post by Support Team » Wed Jun 12, 2013 12:41 pm

Hi,

What you could also try is to add the specific "Element 'fpSpread1'" to the GDI Capture List as described on the following page: Automation of Legacy Applications with the GDI Capture Plug-In.
Another possible way how you could retrieve the data of the specific view would be using InvokeRemotely as described here: Transfering data to and from a .NET control.
There are also many forum posts about how to retrieve data of a WinForms control using InvokeRemotely, these postings would be helpful in order to get an impression how this could work.

Regards,
Markus
.
Image

i.matveev
Posts: 40
Joined: Thu Apr 11, 2013 1:10 pm

Re: Spy finds no entry in the table

Post by i.matveev » Fri Jun 21, 2013 1:19 pm

Neither option offered support did not help
How can I get the AccesibleDescription in the code module? The brain itself has broken. Help please. Give an example.

i.matveev
Posts: 40
Joined: Thu Apr 11, 2013 1:10 pm

Re: Spy finds no entry in the table

Post by i.matveev » Fri Jun 21, 2013 2:15 pm

The question is removed! The solution is found in the form of GetPropertyValue("AccesibleDescription')