cancel
Showing results for 
Search instead for 
Did you mean: 

Reading table from .NET application

diane.sanzone
Level 7
I'm trying to read a table in from a .NET based application. I'm able to spy the table element in Win32, UIA, and AA modes, but none are able to read back the data. When I use Win 32 with a "get all items" action I get an exception "Expected data items to implement ICustomTypeDescriptor". When I use UIA with a "get rows" action, I get an exception "Unable to find a valid pattern - required: GridPattern". When I use AA and the "get table" action, it reads back a collection with a single column containing all the row headers (HistoryRow0(),AmountRow0(), etc.) , but no actual data is returned. 

Has anyone else experienced anything like this or have any suggestions on how I might get the data from this table?  Unfortunately it's dynamic with a varying number of rows, so I can't even use a region to identify and read back the data.

------------------------------
Diane Sanzone
------------------------------
8 REPLIES 8

HarikeshPrakas1
Level 2
I am also facing the same issue while reading values from winform application

------------------------------
Harikesh Prakash
Associate
Cognizant
Asia/Kolkata
------------------------------

LucaValente
Staff
Staff
Hi Diane,

may I ask what Windows version are you using? The GridPattern class (table pattern) is not available in Windows7. Not sure it's your case.


------------------------------
Luca Valente
Senior Product Consultant
Blue Prism
America/New_York
------------------------------

Hi Luca. I'm running Windows 10, but I thought I saw somewhere in the app that it was built with/for/on Windows 8. I don't know how valid that notation was, though.  Even so, I'll take any possible method to read this table as it's a critical piece to my process.​

------------------------------
Diane Sanzone
------------------------------

Any chance you can use GlobalSendKeys to select the table (CTRL-A) and copy it to the clipboard (CTRL-C)? Then you can use the "Utility - Environment" to read the content of the clipboard and parse the text.

------------------------------
Luca Valente
Senior Product Consultant
Blue Prism
America/New_York
------------------------------

The application does not accept a control+A even from a real person so unfortunately that won't work either.​

------------------------------
Diane Sanzone
------------------------------

First of all, I can't stress enough how critical the Application Assessment (during the Define phase) is to ensure that developers don't run into those types of issues during the build: https://portal.blueprism.com/robotic-operating-model/delivery-methodology/delivery-approach/define/application-assessment

It is difficult to assess what strategy can work in your case without having access to that application. Please verify is the application gives the ability to export the content of the table to a .csv or excel or pdf file. In that case, you can export and open the file and parse it. Also please verify if the Application Navigator can help to identify elements that the regular "Identify" method cannot. You can also try to change Application Modeller parameters such as "Disable Invasive techniques" and "Select the Application Manager mode".


------------------------------
Luca Valente
Senior Product Consultant
Blue Prism
America/New_York
------------------------------

Luckily this is the design phase, unfortunately this is the best way, by far, to gather the information we need for the business unit.

I don't understand what you mean by, "Please verify is the application gives the ability to export the content of the table to a .csv or excel or pdf file."  This is a banking application and I am looking at account transaction history. There is a print function on the screen, but it only prints to a physical laser printer that is defined on the server running the software. Changing my local default printer to pdf or other has no impact on where the file prints.  

I am able to identify the table element properly using the UIA tree, however the AA tree never completes loading due to the number of elements on the screen at any given time.  Even after identifying using the UIA tree, the same exceptions occur as included in my original post.  I'm trying to upload/include a screenshot of that UIA tree, but that action is blocked by my security department. I'll keep trying and post when able, if approved.




------------------------------
Diane Sanzone
------------------------------

Hi Diane,

some applications give the option to export data to file, and that's a viable workaround in the case you need to read values that can't be spied using any BP spy modes. I was suggesting to explore the application menus/toolbars and see if there is any other way to access the data you need from a different screen or on a different way: not always is necessary to replicate all the exact steps a human does on the application. You can try to request the customer's IT to add the "Save as PDF" option to the Print function (I understand it might be difficult to get it approved though).



------------------------------
Luca Valente
Senior Product Consultant
Blue Prism
America/New_York
------------------------------