driver.Navigate().GoToUrl("my link"); WebDriverWait wait = new WebDriverWait(drv, TimeSpan.FromSeconds(10)); IWebElement gridElement = wait.Until(driver => driver.FindElement(By.Id(val0))); // changed variable name here IWebElement studentNumberElement = drv.FindElement(By.XPath("//td[contains(text(), 'val0')]")); IWebElement imageLink = studentNumberElement.FindElement(By.XPath("/html/body/form[2]/div[4]/div[1]/div[4]/div/div/div[2]/div/div["+(i+1)+"]/div/div[2]/h6")); imageLink.Click(); C#
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)