According to A way to match on text using CSS locators, we should be able to use "^$"
to find exact text match using CSS locators.
But with:
<div class="item"><div class="text">Trouble</div>
the following two (xpath and css without "^$"
) can find the element:
css=div.item > div.text:contains("Trouble")
//div[@class='item']/div[@class='text' and text() ="Trouble"]
However this one (with "^$"
) can not: css=div.item > div.text:contains("^Trouble$")
Did I miss anything?