I got the following HTML code:
<div><h6>abc/h6><p>date</p></div>
I can successfully find this element with selenium based on text. Now the problem is that <h6> can contain different words like "def" OR "ghi". How can i add a OR in the following XPATH?
With only AND this is working:
"//div/p[contains(text(),'date') and preceding-sibling::h6[contains(text(),'abc')]]"
Now with AND & OR have tried without success
"//div/p[contains(text(),'date') and preceding-sibling::h6[contains(text(),'abc') or preceding-sibling::h6[contains(text(),'def')]]"
also this without success
"//div/p[contains(text(),'date') and preceding-sibling::h6[contains(text(),'abc' or 'def')]]"