I have an XHTML page where each HTML element has a unique custom attribute, like this:
document.querySelector("div[data-automation]")
=> finds the div
document.querySelector("div[data-automation='something']")
=> finds the div with a value