Programmatically click on a non-button element using javascript?

Viewed 20758

How to programmatically click on a non-button element using javascript? Or is it atleast possible in browsers like Firefox and Chrome?

5 Answers
document.querySelectorAll('#front-chat-container div[role]')[0].click()

worked for me - to click a div element.

Related