js to click a button code example
Example 1: javascript click button by id
var button = document.getElementById("button");
button.click();
Example 2: javascript click
const element = document.querySelector('element');
element.click();
var button = document.getElementById("button");
button.click();
const element = document.querySelector('element');
element.click();