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 ?

有帮助吗?

解决方案

The solution for this is:

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

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top