I have a scenario that results in one of many validation icons appearing. I need to be able to assert that any one of them is visible but I have problems because of the other ones that remain hidden.
I'm using SeleniumExtras.WaitHelpers
here:
Wait.AWait.Until(ExpectedConditions.ElementToBeClickable(By.CssSelector(a.error_Icon)));
but this always fails (due, I think, to the other icons that remain hidden which have the same class) but when I use the id for a specific element for a particular scenario, it works:
Wait.AWait.Until(ExpectedConditions.ElementToBeClickable(By.CssSelector(SpecificElementById)));
The hidden icons are in a span element with this attribute: style="display:none;"
The unhidden icon's span element does not have style="display:inline;"
or anything else that I can see to use.
So, is there a way for me to use the first choice where I only use one selector for all scenarios?