Код: Выделить всё
public void ClickTableLink(String issueNumber)
{
ReadOnlyCollection tableRows =
driver.FindElements(
By.XPath(
".//*[@id='complaintsTable']/tbody/tr[contains (@class, 'gridLayoutEvenRow' ) or contains(@class, 'gridLayoutOddRow')]"));
foreach (IWebElement row in tableRows)
{
try
{
row.FindElement(By.XPath("td[contains(text(), '" + issueNumber + "')]"))
.FindElement(By.XPath("//td/a"))
.Click();
break;
}
catch (NoSuchElementException e)
{
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/408 ... g-tablerow