Get values from tables (web based app)

rikrelop

New Member
Hello again everyone!

This time I'm trying to read the values from a table that has a variable number of rows, but a fixed number of columns. Is there any way to read the entire table on HTML and set it as a collection? Also, is there a way to count the number of rows, which could be "n" (no verifiable limit)?

Observation: I have successfully mapped it on HTML spy mode, it has been detected as a grid on Attribute: ID = grid

If anybody has done this before, please kind to help us! My team and I have been searching for an answer on this, but we got nothing.

Thank you and regards,
 
Hello again everyone!

This time I'm trying to read the values from a table that has a variable number of rows, but a fixed number of columns. Is there any way to read the entire table on HTML and set it as a collection? Also, is there a way to count the number of rows, which could be "n" (no verifiable limit)?

Observation: I have successfully mapped it on HTML spy mode, it has been detected as a grid on Attribute: ID = grid

If anybody has done this before, please kind to help us! My team and I have been searching for an answer on this, but we got nothing.

Thank you and regards,


Hi,
Its very simple and easy to get data from a table. All you need to do is spy just one element from the entire table. Then use the reader stage in blue prism and in data drop down select "Get Table".
I am attaching screenshots for your help.
 

Attachments

  • reader stage.PNG
    reader stage.PNG
    16 KB · Views: 2,084
  • TableData.PNG
    TableData.PNG
    60 KB · Views: 2,017

RDawson9

Geek
Staff member
A great suggestion from @amanbareilly however, on some occasions, this won't work.

What you'll need to do is use a dynamic HTML path to return the values of the table, cell by cell. Break up the path into segments and use counters to increase the row or column each time, depending on your requirement.

e.g. HTML/BODY(1)/BODY(1)/TABLE(1)/TR(1)/TD(1) could be the location of the first cell in the table. So the value of TR must be increased by 1 each time to move down the table and TD to move across it.

I would advise reading the Blue Prism Browser Automation guide.

Rob :)
 

ratulgh

New Member
Hi rikrelop,

I too faced a similar challenge and had to solve it using what RDawson9 suggested. The path increment was the best way to read the table data. I performed this on a web calendar where the only way to select the date was to perform a click operation on the specific date. So i had to read every cell in the calendar grid. Attaching a documentation and hope it helps your team.

Cheers!
 

Attachments

  • Handeling calendar elements using dynamic path.pdf
    544.1 KB · Views: 1,106

sachit2099

New Member
Hi rikrelop,

I too faced a similar challenge and had to solve it using what RDawson9 suggested. The path increment was the best way to read the table data. I performed this on a web calendar where the only way to select the date was to perform a click operation on the specific date. So i had to read every cell in the calendar grid. Attaching a documentation and hope it helps your team.

Cheers!


How did you differentiate between 31 days and 30 days or even 28 days in a certain month?
I am facing the same issue has above but am unable to find a way to retrieve the total number of rows/columns and have that feed in to the path increment.
 

Boyismad

New Member
A great suggestion from @amanbareilly however, on some occasions, this won't work.

What you'll need to do is use a dynamic HTML path to return the values of the table, cell by cell. Break up the path into segments and use counters to increase the row or column each time, depending on your requirement.

e.g. HTML/BODY(1)/BODY(1)/TABLE(1)/TR(1)/TD(1) could be the location of the first cell in the table. So the value of TR must be increased by 1 each time to move down the table and TD to move across it.

I would advise reading the Blue Prism Browser Automation guide.

Rob :)

I agree it here. I am currently having this problem. What if i cannot even get the cell? I am able to spy the whole "table" in html mode. I want to get all the information in the box. Can anyone share code to add it to a data item?
 

Manickj

New Member
Hi,
Its very simple and easy to get data from a table. All you need to do is spy just one element from the entire table. Then use the reader stage in blue prism and in data drop down select "Get Table".
I am attaching screenshots for your help.
Hai I am using same function in chrome but collection i am getting 3 column values only please help ma. Client requirement is chrome only
View attachment 1592899153963.png
View attachment 1592899141959.png
View attachment 1592899123883.png
 

MadhuG001

Member
A great suggestion from @amanbareilly however, on some occasions, this won't work.

What you'll need to do is use a dynamic HTML path to return the values of the table, cell by cell. Break up the path into segments and use counters to increase the row or column each time, depending on your requirement.

e.g. HTML/BODY(1)/BODY(1)/TABLE(1)/TR(1)/TD(1) could be the location of the first cell in the table. So the value of TR must be increased by 1 each time to move down the table and TD to move across it.

I would advise reading the Blue Prism Browser Automation guide.

Rob :)
Great suggestion. It helps me out for some projects.
But the problem with current Web Application I am automating is the TR values are not not dependent on previous values. It keeps on changing it's values for different tickets.
Kindly assist. Tried with all spy mode, but it's working for a certain set of tickets only.

Is there any Code Stage I can use to fix this ?
Please asvise.
 

MadhuG001

Member
A great suggestion from @amanbareilly however, on some occasions, this won't work.

What you'll need to do is use a dynamic HTML path to return the values of the table, cell by cell. Break up the path into segments and use counters to increase the row or column each time, depending on your requirement.

e.g. HTML/BODY(1)/BODY(1)/TABLE(1)/TR(1)/TD(1) could be the location of the first cell in the table. So the value of TR must be increased by 1 each time to move down the table and TD to move across it.

I would advise reading the Blue Prism Browser Automation guide.

Rob :)
Great suggestion. It helps me out for some projects.
But the problem with current Web Application I am automating is the TR values are not not dependent on previous values. It keeps on changing it's values for different tickets.
Kindly assist. Tried with all spy mode, but it's working for a certain set of tickets only.

Please assist how can we proceed with the Code Stage to read an element.
 
Top