title: OpenQA.Selenium.InvalidSelectorException: 'invalid selector: An invalid or illegal selector was specified error in Selenium
body: <p>I am using chromedriver in CS to find an element using css selector however I receive the following error:</p>
  <pre><code>OpenQA.Selenium.InvalidSelectorException: 'invalid selector: An invalid or illegal selector was specified
  </code></pre>
  <p>My code:</p>
  <pre><code>var body = driver.FindElementsByCssSelector(&quot;.add-to-cart.float-right.font-montserratSemiBold.text-11.lg:text-12.text-secondary.flex.flex-wrap.leading-articlesmall&quot;);
  </code></pre>
  <p>I am trying to find the element of the <code>Add to basket</code> buttons on <a href="https://www.pggoodeveryday.com/coupons/" rel="nofollow noreferrer">this website</a></p>
  <p>What is wrong with my selector and how can I resolve this issue?</p>