[Solved] How to avoid repetitive method calls?


You can use a loop:

0.upto(100) { |i| p area.all('tr')[i].text }

Or – if you want to print every row – call each:

area.all('tr').each { |row| p row.text }

solved How to avoid repetitive method calls?