title: Selenium find_element_by_class_name and find_element_by_css_selector not working
body: <p>I'm scraping a website that has the following structure:</p>
  <pre><code>&lt;div class=&quot;cr__stores-list&quot;&gt;
    &lt;div class=&quot;cr__stores-item&quot;&gt;store1&lt;/div&gt;
      &lt;a href=&quot;/stores/store1/&quot;&gt;
      &lt;div class=&quot;cr__stores-item-b&quot;&gt;
        &lt;div class=&quot;cr__container-name&quot;&gt;
          &lt;h3 class=&quot;cr__container-name-title cr__text--subtitle3 cr__textColor--colorDark300&quot;&gt;
            Store Name
          &lt;/h3&gt;
        &lt;/div&gt;
       &lt;/div&gt;
      &lt;/div&gt;
    &lt;div class=&quot;cr__stores-item&quot;&gt;store2&lt;/div&gt;
      ...
      ...
    &lt;div class=&quot;cr__stores-item&quot;&gt;store3&lt;/div&gt;
    &lt;div class=&quot;cr__stores-item&quot;&gt;store4&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Each &quot;div class=&quot;cr__stores-item&quot;&quot; inside &quot;div class=&quot;cr__stores-list&quot;&quot; has the exact same structure.
  for each  &quot;div class=&quot;cr__stores-item&quot;&quot; I'm trying to scrape the url and the store name inside the h3 tag</p>
  <p>I have the following code so far:</p>
  <pre><code>    wd = webdriver.Chrome('chromedriver', options=options)
      wd.get('stores_url')        
      element = WebDriverWait(wd, 20).until(EC.presence_of_element_located((By.CLASS_NAME, &quot;cr__stores-list&quot;)))
      list_stores_tags = element.find_elements_by_class_name(&quot;cr__stores-item&quot;)
      for store_tag in list_stores_tags:
          # store_tmp = store_tag.find_element_by_class_name(&quot;cr__container-name-title cr__text--subtitle3 cr__textColor--colorDark300&quot;)
          # store_tmp = store_tag.find_element_by_css_selector('h3.cr__container-name-title cr__text--subtitle3 cr__textColor--colorDark300')
          store= store_tmp.text
          url_tmp = store_tag.find_element_by_tag_name(&quot;a&quot;)
          url = url_tmp.get_attribute('href')
  </code></pre>
  <p>The 2 commented lines are my attempts at getting the store name.
  With this code I'm successfully getting all urls of each store without problem.
  However I'm unable to get the store names. Neither find_element_by_class_name nor find_element_by_css_selector seem to work as in both cases I get an exception:</p>
  <p>Message: no such element: Unable to locate element: {&quot;method&quot;:&quot;css selector&quot;,&quot;selector&quot;:&quot;.cr__container-name-title cr__text--subtitle3 cr__textColor--colorDark300&quot;}
  (Session info: headless chrome=87.0.4280.88)</p>
  <p>or</p>
  <p>Message: no such element: Unable to locate element: {&quot;method&quot;:&quot;css selector&quot;,&quot;selector&quot;:&quot;h3.cr__container-name-title cr__text--subtitle3 cr__textColor--colorDark300&quot;}
  (Session info: headless chrome=87.0.4280.88)</p>
  <p>What am I doing wrong? Any suggestions would be welcome.
  Thanks!</p>