Here is the source code:
When the element is highlighted, it adds “ui-state-highlight” to class=
<div id="entry_1994" class="entry ui-widget-content ui-state-highlight" onfocusout="a();" onclick="if (window.bIgnoreClick===undefined) { clickHandler('entry_1994'); } else { window.bIgnoreClick=undefined; }" style="border: 1px dashed rgb(119, 119, 119);">
<script type="text/javascript">
<div id="entry_2037" class="entry ui-widget-content" onfocusout="a();" onclick="if (window.bIgnoreClick===undefined) { clickHandler('entry_2037'); } else { window.bIgnoreClick=undefined; }" style="border: 1px dashed rgb(119, 119, 119);">
There are a lot more of these. I want to check all of these elements and see if they are highlighted, if they are highlighted, I want to store or count these highlighted elements and compare it with a number.
For example, there are 10 of these elements, 5 of them are highlighted, so the 5 should compare it to the number I have.
There are 10 of these elements, 7 of them are highlighted, so the 7 should compare it to the number I have.
Look into finding elements by partial text for css selectors: http://sauceio.com/index.php/2010/01/selenium-totw-css-selectors-in-selenium-demystified/
For xpath: http://blog.ianbicking.org/starting-with-selenium.html