Jump to content
Sign in to follow this  
linoskoczek

FF - Problem with clicking <a> element with 'onclick' tag

Recommended Posts

linoskoczek

Hello!

I've got a problem with simulating a click on:

 

<a class="single_like_button btn3-wrap" onclick="openFbLWin_161403();">
   <span> </span>
   <div class="btn3">Retweet</div>
</a>
I've tried many methods, but none of them worked. Methods were like:

$wrong = _FFObjGet("btn3-wrap", "class")
_FFObjDelete($wrong)
$likegreen = _FFObjGet("btn3-wrap", "class")
_FFClick($likegreen)
$likegreen = _FFObjGet("single_like_button", "class")
_FFClick($likegreen)
$likegreen = _FFObjGet("btn3", "class")
_FFClick($likegreen)
$js = _StringBetween(_FFReadHTML("body"), '<a class="single_like_button btn3-wrap" onclick="', '"')
_FFOpenURL($js)
Page seem to load this element via Ajax, thats why I gave Sleep(5000) before doing it everything, but didn't helped

 

Any ideas?

 

Greetings.

Edited by linoskoczek

Share this post


Link to post
Share on other sites
linoskoczek

Already solved it, sory for slow reaction.

The mistake was here:

$js = _StringBetween(_FFReadHTML("body"), '<a class="single_like_button btn3-wrap" onclick="', '"')
_FFOpenURL($js)

_StringBetween return value in Array.

I made click with _FFDispatchEvent(), with simulating a keyboard click.

Anyway thank you for this, I'm sure I will use it in other case when both other metods won't work!

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  

×