there are a few tables on the page. In one of them I need to select respective company code and then proceed. I have a problem with the following code. I don't know what approach should I use and if I get the correct company code, then how to click in it?
public void selectCompanyCodeFromTable(String companyCode){
int rowCount = shoppingCart.companyCodeTable.size();
for (int i = 1; i <= rowCount; i++) {
String sCellValue = driver.findElement(By.tagName("tr")).getText();
if (sCellValue.equalsIgnoreCase(companyCode)) {
System.out.println("Found the respective company code");
//How to click/select this particular row?
}
}