Jump to content
Sign in to follow this  
Kashgari

Simple clicking script not working

Recommended Posts

Kashgari

Hi friends,

I have a simple script which has to click a image button linked to JavaScript , which is not working. 

My script is as under:

#Include <FF.au3>

If _FFConnect(Default, Default, 3000) Then


    _FFOpenURL("http://example.com/u/3749192630/")

        Sleep(Random(10000, 15000, 1))

    $sObj = _FFXpath("//a[@action-type='fl_like']","",9) ; get the image with the alt-text test_bild_3 ...
    _FFClick($sObj) ; ... and click on it



    Else
    MsgBox(0,"Error:", "Can't connect to FireFox!")
EndIf

The actual code of the website is as under:

 

>

    <a class="S_txt2" suda-uatrack="key=profile_feed&value=like" title="赞" action-data="version=mini&qid=heart&mid=3865062454367600&loc=profile" action-type="fl_like" href="javascript:void(0);">
        <span class="pos">
            <span class="line S_line1">
                <span node-type="like_status">
                    <i class="W_icon icon_praised_b"></i>
                    <em></em>
                </span>
            </span>
        </span>
    </a>
    <span class="arrow"></span>

</li>

 

Share this post


Link to post
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
Sign in to follow this  

×