0

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.

novicePrgrmr
  • 18,647
  • 31
  • 81
  • 103
  • your code is correct - it should click on push only, if it clicks on something different, then tag defined differently on the page and you need to provide page code snippet or link to page to get the answer. – Bestmacros Dec 28 '13 at 08:28
  • @Bestmacros Just added a code snippet of the push and pushed `` – novicePrgrmr Dec 28 '13 at 16:34

1 Answers1

0

try this:

TAG POS=1 TYPE=SPAN ATTR=class:push
Bestmacros
  • 1,697
  • 12
  • 26
  • I don't think that would work, because the attribute's class isn't push, it's "normal". – N01zii Dec 29 '13 at 17:37
  • Just tried that, and the issue is that ``Pushed`` is also in the ``text`` div but is just hidden with ``display:none`` so it picks those up too. – novicePrgrmr Dec 29 '13 at 20:40
  • Just started a bounty if you want to check out the edits I made and see if there is a possible solution. – novicePrgrmr Dec 31 '13 at 16:58
  • according to provided page html my code should work, if it does not work, when something is much more different on the website itself and without seeing it is impossible to provide solution – Bestmacros Jan 01 '14 at 19:03