public bool IsTestElementPresent(By element)
{
try
{
driver.FindElement(element);
return true;
}
catch (NoSuchElementException)
{
return false;
}
}
if (IsTestElementPresent(By.XPath("//*[@id='content']/div[8]/div[1]/div[1]/div[1]/h1")))
{
//Element bulundu :)
}
else{
//Element bulunamadı :(
}