Search code examples
xpathoperators

Why my OR operator doesn't work on XPATH?


I've tried both

//th[text()="Seller Finanacing Available"]/following-sibling::td[text()="Yes" OR text()=""]

and

//th[text()="Seller Finanacing Available"]/following-sibling::td[text()="Yes"|text()=""]

but both don't work. What do I do wrong when I want to use OR operator in XPATH for attribute value?


Solution

  • the OR should be lowercase instead

    //th[text()="Seller Finanacing Available"]/following-sibling::td[text()="Yes" or text()=""]