:+1: for moving the check out. But the reason it was doing input.findElement(by) inside the Function is, the table is dynamic. I think jsf ajax will keep the table id but populate/replace it's content dynamically. If you pass a WebElement table to below method, while it's iterating to convert to TableRows, the table may still change and result in a StaleElementException. Therefore it's safer to move the table lookup inside Function. If it's stale it will retry until timeout.