I'm using Selenium and C# to test a widget that is implemented across multiple websites however on a few of these websites there is an additional drop down. I'd rather not just ignore this additional drop down but I am trying to incorporate an if statement into my test to handle it.
[Then(@"I Input an Option If Available")]
public void ThenIInputAnOptionIfAvailable()
{
var option = CurrentBrowserFindElement(By.Name("option1"));
}
I can't get past the point of finding the element - I am hoping someone here can teach me how to handle conditions similar to these with C# and Selenium.