At Click Element Selector there are four types of unique buttons. Two of them are:
- Unique HTML+Text - buttons with identical HTML and text content are considered equal
- Unique HTML - buttons with identical HTML and stripped text content are considered equal
What is the exact difference between those two?
For example, if we have those two buttons:
<button type="button" class="yyy" onclick="xxx">1</button>
<button type="button" class="yyy" onclick="xxx"> 1 </button>
which are identical, except for a small difference in text, where the second has some spaces.
The unique HTML considers those two buttons equal because they have the same text, despite the extra spaces the second has, but the unique HTML+TEXT doesn't consider those two buttons equals due to the extra spaces or newlines?
Ιn conclusion the difference between Unique HTML+Text and Unique HTML is that the first takes into account the spaces and newlines of the text (at the start, middle, or end of the text) and the second stripe away the spaces and newlines and takes into account only the clean text (and HTML of course)?