how to record a button click action in webpage using javascript 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();