I am trying to figure out a way to locate an element with XPath based on two text strings. The element in question can have text A or text B, both of which are valid, and I need to assert that this element is visible, based upon this text. So I need an XPath expression like "//*...[contains(text(), 'A')] OR [contains(text(), 'B')]". Is this possible? This must be using XPath 1.0 as it is for Selenium Webdriver.
I have not found any way to do this, so I'm currently checking for the first string in a try-catch, then asserting for the second string afterwards.