Jump to content

Index of link sting, firefox click


Recommended Posts

I have a simple task to click several links on a website , the link structure is like these:

<a href="javascript:vote(418,3610,7,'69d2a72d579e02bdad5230fe708b43be',10)">Vote</a>
<a href="javascript:vote(418,4207,6,'d60ab6a37452ea9ef0ec42166e6d0574',10)">Vote</a>
<a href="javascript:vote(418,5209,4,'392e7369bf1c85da43cdef9b09c468d0',10)">Vote</a>

I can manage to click using :

_FFLinkClick("javascript:vote")

but it clicks the same link again and again, how can I make a simple script to click next link, I believe it would be combination of "href" value and "index" value, I do not know how to write the script.

Please help

Edited by Kashgari
Link to comment
Share on other sites

Hello,

you can call the Java Script-functions without clicking, too:

#include <FF.au3>

If _FFConnect() Then
    $aJS = _FFXpath("//a[contains(@href, 'vote')]", "", 6) ; getting all vote-links
    For $i = 1 To $aJS[0]
        _FFCmd("content.wrappedJSObject." & StringMid($aJS[$i], 12)) ; call the Javascript-function
        _FFLoadWait()
    Next
EndIf
Edited by Stilgar
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...