How would you convert the count of xpath to int?
int example = driver.FindElement(By.XPath("(//td[contains(@sorttable_customkey, '" + Account + "')])/preceding::a[1]")).Count;
I picked this up from question: Does anyone know why GetXpathCount() doesn't work in C#?
I can't seem to get it to work, I tried dumping the above to a list and counting the list but this also wouldn't work.
Also sort of off topic but is there a way to check if driver.FindElement(By.XPath("exp")) == null? because if it dose = null it will throw a null reference error.