How to add OR
logic within an xpath locator?
Is it possible to add OR
logic within an xpath locator, so they my test scripts are using one or the other?
For example I have constructed the following locator:
//div[contains(@id,'va:results')]//h1 | //div[contains(@id,'va:results')]//h3
The test scripts seem to throw the odd exception:
Exception: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@id,'va:results')]//h1 | //div[contains(@id,'va:results')]//h3"}
But the tests are not failing; as I'm assuming one of the above selectors are being used.