Код: Выделить всё
driver.FindElement(By.XPath("//div[@class='video']/a")).Click();
else
{
driver.FindElement(By.XPath("//div[@class='W_VIEWED']/a")).Click();
}
Подробнее здесь: https://stackoverflow.com/questions/275 ... ent-exists
Код: Выделить всё
driver.FindElement(By.XPath("//div[@class='video']/a")).Click();
else
{
driver.FindElement(By.XPath("//div[@class='W_VIEWED']/a")).Click();
}