Get list position

Hi,
I’m a newbie and I need to create a macro. I’ve in a html page a list of lines in which there is a text and a button in each line:

line 1 - button
line 2 - button
line 3 - button
line 4 - button

RPA should find a fixed text (for example “line 2”), gets the line number of readed line and use this information to click button of the line (in example button of line 4).

Could you help me?

Thank you!

This should help: Table: Click button NEXT TO a certain table entry