pic 2
I have a table as pic 1. I need to find one invalid cell (valid: green-background, invalid: red-background). If they're all valid as picture, I must press to back previous page I got script to get current page:
current_page =driver.find_element("//span[@class='currentPage']).get_attribute("innerText")
But I don't know how to loop through each cell of table to find which one valid or not to click or do other actions.
Thank your help in advance

