Hi Telmo, thank you so all your solutions. it is working fine for me.
I am facing one more problem. When I want to validate whether the data is value1 or value 2 I am unable to run it.
here is the below code and unfortunately expect is not working here. I am not sure what is the issue here
totalRows=batchlistPage.getRowCount
rowNum=1
while(rowNum<=totalRows)
data = batchlistPage.getRowText(rowNum)
puts data[3]
puts value1
puts value2
expect(data[3]).to eq(value1) | eq(value2)
//ABOVE LINE IS NOT EXECUTING AND IT COMES UP WITH FAIL MESSAGE
# expect(data[3].to eql? value1 || (data[3].to eql? value2)
rowNum+=1
end