Using an OR condition in Xpath to identify the same element

前端 未结 3 1388
花落未央
花落未央 2020-12-03 08:51

I have this logic which gets the current page\'s title first clicks on next button, fetches the title again and if both the titles are the same, meaning navigation has not m

3条回答
  •  情书的邮戳
    2020-12-03 09:49

    You can use or operator like

    (.//span[@class='g-title'])[2] or .//span[@class='g-title']
    

    For more details : Two conditions using OR in XPATH

提交回复
热议问题