0

I'm coding a little bot that auto like's a post on a new social network. So now my problem is that when I'm tring to click on the like button, it doesn't click. I've tried all, C# code, Javascript etc etc.

This is the Html Page Code :

<div class="stats_wrapper like_stats_wrapper ">
    <span class="like_button like_stats_span sprite_icon">
    </span>

    <span class="count like_count like_button">
        Like
    </span>
</div>

I need to trigger the click event on this element using code.

1 Answer 1

2

jQuery has some simple functionality to trigger a click, or any other event you so wish:

$('.count.like_count.like_button').trigger('click');

https://api.jquery.com/trigger/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.