How to add xpath in a click function?
const buttonSelector = cssSelector;
{some function}
$(buttonSelector).click();
But, When I use Css Selector, the clicking goes on an endless loop, since adding more attributes doesnt work with CSS Selector. So, I decided to use Xpath and modified the code like follows, but, I am getting a syntax error.
const buttonSelector = document.querySelector('//Xpath');
{some function}
$(buttonSelector).click();
How can I correct this to make it work?
