Need to select last item in the table content

Hi,

In below screenshot as seen I want to scroll down to the last item and select the last item everytime. the table content increases everytime and I want to select last item.

How to do it.

image

Follow those steps

  1. Extract datatable
    image

  2. assign idx = ExtractDatatable.RowCount.ToString ( maybe it needs +1, -1)
    image

  3. use Check activity, and inside of selector in attribute idx = {{idx}}, add the vrbl idx to idetify the last row. in this example you can add vrbl idx also inside of tableRow attribute

I used this DataTables example - Select - checkboxes
as an example

Hi @shruthi_arali

Can you please show me the selector of that particular checkbox which you want to select?

Thanks!!

webctrl css-selector=‘body>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>span>svg>rect’ idx=‘13’ tag=‘rect’ /

Hi @shruthi_arali

Check the below process,
→ Use the Extract Datatable activity to extract the data as a datatable, let’s call the datatable variable name as dt_Extracted.
→ Take an assign activity and create a Integer datatype variable called RowCount.

- Assign -> RowCount = dt_Extracted.rows.Count

→ Take an other assign activity and create a Integer datatype variable called Count.

- Assign -> Count = 1

→ After Assign activity insert the for each row in datatable activity to iterate the each row in the dt_Extracted datatable.
→ Inside for each activity insert the If condition and give the condition as below,

- Condition -> Count = RowCount

→ Inside then block insert the click activity and indicate on one of the check box.
→ When indicating the check box, check the strict selector and uncheck the fuzzy, image and computer vision in the selector window.
→ Open the UI Explorer and find the attribute which has row count, changing for every check option in the data.
→ Replace the Count Variable in the attribute.
→ Outside If condition use an assign activity to increment the Count.

- Assign -> Count = Count+1

Hope it helps!!

Extract the table and get the count of the rows in assign activity, use the click activity for the checkbox and pass the rowcount variable in

selector=‘body>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>div>span>svg>rect’ idx=‘“rowcount”’ tag=‘rect’ /

in this selector.

Thanks!!