XPath with multiple conditions

后端 未结 5 1786
慢半拍i
慢半拍i 2020-11-30 19:24

What XPath can I use to select any category with a name attribute specified and any child node author with the value specified.

I\'ve tried different variations of t

5条回答
  •  無奈伤痛
    2020-11-30 19:31

    Here, we can do this way as well:

    //category [@name='category name']/author[contains(text(),'authorname')]

    OR

    //category [@name='category name']//author[contains(text(),'authorname')]
    

    To Learn XPATH in detail please visit- selenium xpath in detail

提交回复
热议问题