cancel
Showing results for 
Search instead for 
Did you mean: 

Spying Dynamic HTML/Javascript table

john.hammond
Level 6
Good morning all.

Very new to RPA (and Blue Prism) and have been tasked with developing an object to input data into a Dynamic HTML/Javascript table. A screengrab of this table is below:

25602.png
Now, this actually highlights the problem quite well - that Description cell (highlighted) is initially an input field when navigating to the page, but as soon as anything is clicked off, the cell ends up like this.
After pulling my hair out about this, I discovered a mini workaround which can be achieved by sending a Global Mouse Click (Right), which leads to this (should say, this is through highlighting the cell in Cmd Row 1 as UIA):
25603.pngNavigating manually to List enables me to select another item 'Form' which enables me to enter each row in a regular form, which is much easier to spy.
However, when trying to replicate this list in Blue Prism, I'm able to successfully bring this menu up, but navigating through this is again making the menu disappear. 
So far, I've tried using Global Send keys "{Down}" "{Down}" etc., but this appears to 'spook' the menu and it disappears (this does work when doing it manually).
FYI, if it helps, we're currently running Blue Prism 6.6. If you require any further information, I'll do my best to help, but as mentioned, this is all very new (and confusing!) to me at present.

------------------------------
John Hammond
------------------------------
4 REPLIES 4

Hi John,

Could you please try passing that selected value to that field directly using write stage or Global send keys .
For Example if you want to select Go then directly try to pass to that field sometimes it works. Other than that it's very difficult to tell you without seeing the UI.

------------------------------
Amlan Sahoo
RPA Consultant
Equinix
------------------------------
Regards,
Amlan Sahoo

Hi John,

do you know if the classes/Ids of the table elements are static? You could Spy the HTML elements like this and just increase the match index as needed (pass it as a dynamic attribute and use a count to increase it as the rows increment). 

Try interacting with the table with the Browser Developer tools enabled and see how the HTML behaves. 


------------------------------
Ramón Requena López
------------------------------

Thank you for your response.

I've also got very little experience with web design/html unfortunately, so to answer your question, I'm not sure! 
This is currently what I'm able to spy in Browser Mode (note, in the table shown previously, this is pointing at the cell below 'Description' in row 1, which is the first item that needs to be written to)
25588.pngHere is the same element spied in UIA:
25589.png
In Developer Tools, I've managed to find that this seems to refer to the table in question:
When not selected:
25590.png
When selected:
25591.pngThe last line there seems to be the only difference (user-select seems to disappear when note selected), but I'm not entirely sure how that will help me!

Thank you again, any advice would be greatly appreciated!

------------------------------
John Hammond
------------------------------

the two HTML elements you want to look at are class (in this case "dojoxGrid e5h5Grid") and id ("0_0"). If you only need to write into certain columns, I would try to make a dynamic element in the BP application modeller based on unique attributes of a column and then use the Match Index as the row index.

The class name from above does not look totally dynamic (au-contraire to what happens in Salesforce, for instance), so perhaps they will be unique for every column. Using the dev tools of the browser and the inspect option (where you can hover and click with the mouse on the elements and it will point you to the corresponding code snippets) you could assess if this is a possibility or not.

I would highly advise against UIA when it comes to editing fields as bulk, because it is incredibly slow and tedious.

------------------------------
Ramón Requena López
RPA Developer
Magenta Telekom
------------------------------