How can I find an element by CSS class with XPath?

前端 未结 6 1331
刺人心
刺人心 2020-11-22 08:43

In my webpage, there\'s a div with a class named Test.

How can I find it with XPath?

6条回答
  •  無奈伤痛
    2020-11-22 08:55

    I'm just providing this as an answer, as Tomalak provided as a comment to meder's answer a long time ago

    //div[contains(concat(' ', @class, ' '), ' Test ')]
    

提交回复
热议问题