I have to find element with "== $0" after end tag of "span". Below is the HTML Code of element.
<div _ngcontent-c6="" class="col-12">
<span _ngcontent-c6="">Registration with prefilled user's data</span>
</div>
Although while I have copied the html code it is removing "== $0" itself. so I am attaching image also.
I have tried to find out solution but it was not working. I have tried xpath that normally works like .//span[text()='Registration with prefilled user's data'], but no sucess. I just found that "we can access this element in chrome console with syntax ' $0' and it is working fine there
but I do't know how to find it with xpath and CSS or any recommended locator's strategies in Selenium.
Note: Please don't mention any work around say use className or css with class name like div.col-12 span as I knew already this. My problem is handling elements with == $0.