I got this error because I was using a wrong CSS selector with the Selenium WebDriver Node.js function By.css()
.
You can check if your selector is correct by using it in the web console of your web browser (Ctrl+Shift+K shortcut), with the JavaScript function document.querySelectorAll()
.