I'm trying to locate the below element using Selenium:
<a class="ABC" href="#" data-test-id="XXX|YYY|ZZZ">
There are multiple elements on the page with "ABC", "XXX", "YYY" and "ZZZ", but my key words are "ABC" and "ZZZ". So in order to target this element precisely, I need to write something like:
//input[@class="ABC"] AND //*[contains(@data-test-id,'ZZZ')]")
Is there a way to write this in a single XPath?