2

Recently i started working on RPA - BluePrism and i am stuck at one place and not able to proceed further.

I have a HTML table and no of rows is dynamic based on search criteria. i am able to get the rows values in a collection. But the problem is i need to highlight the table row->click button->will open popup->fill few values->close and select 2nd row->follow the same process.

I don't know how to highlight the table row(i cannot create static elements in ApplicationModeller since the rows will be populated dynamically). Please provide some suggestions.

Thanks

dhasan k
  • 129
  • 1
  • 3
  • 10
  • Can you give a link or screen shot of the page? Very hard to visualize the problem without knowing what you are looking at. If the rows are created dynamically, how is the page finding the differences between the fields? I would expect there are values in the fields or by the fields which can be located to find the correct field. – Frank Jelstrup Jan 05 '18 at 11:55

3 Answers3

2

I would consider to spy it using region mode and then using either a single region or a region list. With a list you have to first read the list and then loop through it and check the content with a choice stage if it is equal to the one you want. If there is a hit you can then select to access that specific row.

Note: when you check if the content is there make sure to store the number of which the content is in.

So to sum it up:

  • you need to spy the table

  • make a list over the column in which the content will be present.

  • read the content and store in a collection

  • loop the collection

  • in the loop have two calc stages one counter and one that will save the correct row

  • have a choice stage checking if the current row contains what you want if true set the correct row to be equal to the counter. If False set the counter to +1.

Then when the loop is done, you can take a navigate and point it to the row num that is stored in the "correct row"-data item.

This what i had to do for a system in which the tables differ in amount of rows.

Hope this helped you.

Micheal O'Dwyer
  • 1,237
  • 1
  • 16
  • 26
Peter N
  • 21
  • 1
2

Just spy table cell (or any other element in one row), then use dynamic Path attribute to refer to a correct table element:

"/HTML/BODY/TABLE/TR("&[Row]&")/TD("&[Column]&")"

You have two options for getting number of rows - either spy a table, read to collection and count rows or just iterate over rows with dynamic path until you get exception and handle it.

Elhana
  • 309
  • 3
  • 9
  • This is the right answer - keep in mind that the rest of the attributes will have to be adjusted accordingly to target the desired element correctly. – esqew Jan 23 '18 at 17:51
0

It could be that the values held within the HTML code are not stored directly in table tags, because more HTML code is being held within the table cell. For example: data If Get Table doesn’t work you could try reading the HTML code of the table and use string manipulation to extract the values another way is to use counters for each row and column of the table and read each cell individually.

Ravi
  • 1