Frage

I have more Items that have the same string in the class name, lets say the string is "dummy", The problem is that I cannot do this with things like tr[class^='dummy'] because this class is under different tags and the class attribute can contain more then one CSS class.

Is there a possibility to identify this elements without using switch to identify them ?

War es hilfreich?

Lösung

The solution for this is:

 driver.FindElement(By.CssSelector(".dummy")) 

With this the first element that have this class is returned.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top