I want to check if an element exists in Selenium, and if it does, assign it to a name.
Right now I have something that looks like this:
IWebElement size9 = driver.FindElement(By.CssSelector("a[data-value*='09.0']"));
However, when that element that has the value of 9 does not exist, it returns an error. Is there a way I can check to see if it exists, or something of that sort?