How to use the text between HTML tags to access an element - Selenium WebDriver
<p>I have following HTML code.</p>

<pre><code>&lt;span class="ng-binding" ng-bind="::result.display"&gt;All Sector ETFs&lt;/span&gt;

&lt;span class="ng-binding" ng-bind="::result.display"&gt;China Macro Assets&lt;/span&gt;

&lt;span class="ng-binding" ng-bind="::result.display"&gt;Consumer Discretionary (XLY)&lt;/span&gt;

&lt;span class="ng-binding" ng-bind="::result.display"&gt;Consumer Staples (XLP)&lt;/span&gt;
</code></pre>

<p>As it can be seen that tags are all the same for every line except the text between the tags.
How can I access each of the above line separately based on the text between tags.</p>