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.
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:
The hidden icons are in a span element with this attribute:
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?