This post will help you in reading data from a virtual table. This is really helpful and we took a very long time to come up with this solution. It is very simple but that thought process took some time to set in ;). So here we go.
Create the virtual table using the virtual objects manager. The properties available to you would be Width, Height, Rows, Columns, x, y.
Get the height and width of a single cell by dividing the table width and height by the column and row values respectively.
x and y are the values of the top left corner of the first cell, to get the bottom right corner add the height and width calculated for a single cell. Now use the GetVisibleText property with the parent object.
Like,
Say you have a grid or table that is recognized as a winobject, and you create a virtual table for it. Now the code to read the data from the first cell of the table would be:
val = Window(" ").Page(" ").WinObject(" ").GetVisibleText(x,y,x1,y1)
msgbox val
Hi,
ReplyDeleteI m trying to read the cell text from a virtual table following your method, but still I could not able to do so, Can you please post the code that you have? Thanks.
What is the issue that you are facing?
DeleteI need to get the value from dynamic cell in virtual table , i have tried all other ways like UIA table and etc.. but still having issues to get the value from dynamic cell
ReplyDeleteHi,
ReplyDeleteCould you please help me to retrieve all details from row by row in virtual table?