How to click multiple instances of the same icon on a webpage? (Javascript)
- by akd
I want to write a script that will click every instance of a certain icon. The following code is from the source that is what I want to click on. It has a onclick event defined, I just don't know how to search the page for these icons and then click on them. Can anyone help? Thanks.
<dd><a href="javascript:void(0);"
onclick="RecommendItem(1,'article','6106925','1','recommendstatus_article6106925' ); return false;"
onmouseover="return overlib('Give thumbs up', WRAP);"
onmouseout="return nd();"> <img class='icon' title='' alt='Thumb up' style='background-position: -304px -48px;' src='http://geekdo-images.com/images/pixel.gif' /></a></dd>
<dt class='tippers'><a href="javascript://" style='color: #969600;' onclick="RecSpy( 'article', '6106925', 'tippers' ); return false;"></a></dt>