I am using Angular Material Tab, and all my elements become stale after switching to different tab (which has a clone grid). Instead of doing this for all 20 elements on my grid, is there a way to Refresh ALL elements on page, so my references are not stale?
We are trying to acquire values on the grid.
private By JobIdHeaderGrid => By.XPath("//span[text() = 'Process ID']");
stale element reference: element is not attached to the page document
try {
WebElement date = driver.findElement(By.linkText(Utility.getSheetData(path, 7, 1, 2)));
date.click();
}
catch(org.openqa.selenium.StaleElementReferenceException ex)
{
WebElement date = driver.findElement(By.linkText(Utility.getSheetData(path, 7, 1, 2)));
date.click();
}