How to make iMacro find only the exact string in a TXT attribute

2.7k views Asked by At

I am putting together an iMacro for firefox, and I am having trouble making iMacro find only the exact strong in the TXT attribute. In this iMacro, I am looking for a <span> with the string follow.

Here is the piece of the script:

TAG POS=1 TYPE=SPAN ATTR=TXT:follow

Problem: There are <span> elements with the string following that the iMacro is picking up.

Question: How can I write the macro so that it will only find the <span> with the exact string follow?


Edit: Added HTML (Note: I need the iMacro to click the button)

Here is the page: http://ink361.com/app/users/ig-183814919/followers

Follow:

<button id="followButton" class="followButton normalbutton " data-picture="http://images.ak.instagram.com/profiles/profile_397057078_75sq_1369928076.jpg" data-username="bealilyy" data-userid="ig-397057078">
    <span class="followstatus"></span>
    <div class="text">
       <span class="following">                        <----hidden
          <span class="onhover">Unfollow</span>        <----hidden
          <span class="normal">Following</span>        <----hidden
       </span>                                         <----hidden
       <span class="notfollowing"> Follow </span>
    </div>
</button>

Following:

<button id="followButton" class="followButton normalbutton following" data-picture="http://images.ak.instagram.com/profiles/profile_183814919_75sq_1361757071.jpg" data-username="jcrew" data-userid="ig-183814919">
    <span class="followstatus follows"></span>
    <div class="text">
       <span class="following">
          <span class="onhover">Unfollow</span>   <----hidden
          <span class="normal">Following</span>
       </span>
       <span class="notfollowing"> Follow </span> <----hidden
    </div>
 </button>

EDIT 2: Another issue is that <span class="normal">Following</span> is also in the "follow" HTML text div but is just hidden with display:none so it picks those up too.

1

There are 1 answers

4
Bestmacros On

try this:

TAG POS=1 TYPE=SPAN ATTR=class:push