it behaves like crazy: it clicks the first button of the first type, then the second of the second type, and then it skips one button of the first type and one of the second type. And it restarts again with the remaining buttons.
How can I make it click instead all and only the buttons with the “This is not me” tag?
So at the end your approach is wrong at all.
Why do you want to click a button programmatically? As you should now which function is called when a button is clicked, you should directly call the function instead.
Because I’m the user of the page, not the creator.
It’s an Academia page that should contain the mentions to my name, but instead contains 7.000 mentions to a homonym. Either I click 7.000 times “This is not me” or I find a way to do it automatically via the Chrome console.
So, I don’t know which function is called (could I find it out?).
I can see the buttons are contained in this div:
<div class="wp-workCard_item wp-workCard--mentionsSelector btnContainer">
<button type="button" class="emphasize btn btn-default">This is me</button>
<button type="button" class="btn btn-default">This is not me</button>
</div>