We now know the basics of how one can execute JavaScript snippets in Selenium. This is where some people can start to get a bit carried away.
If you go through the mailing list of Selenium users, you will see many instances of people asking why they can't click on an element. Most of the time, this is due to the element that they are trying to interact with not being visible, which is blocking a click action. The real solution to this problem is to perform an action (the same one that they would perform if they were manually using the website) to make the element visible so that they can interact with it.
However, there is a shortcut offered by many, which is very bad practice. You can use a JavaScript executor to trigger a click event on this element. Doing this will probably make your test pass. So why is it a bad solution?
The Selenium development...