title: python selenium css selector nth element
body: <p>I am trying to parse this code on selenium and basically want the first item from the list i.e "product one-col new"! clicked...</p>
  
  <pre><code>&lt;ul id="product-list"&gt;
  
      &lt;li class="product one-col new"&gt;
          &lt;ul&gt;
              &lt;li class="image" title="one item 5"&gt;
                  &lt;a href="#product/0f37f703-ed9a-3d10-86c0-7d0c0fcdb9ec"&gt;
                      &lt;img width="" height="" alt="" src="/content/images/ProductImages/you-are-here/3/E/4/3E42561208174E6FBC81A10CDAE48659.jpg"&gt;&lt;/img&gt;
                      &lt;span class="new"&gt; … &lt;/span&gt;
                      &lt;span class="hover"&gt;&lt;/span&gt;
                  &lt;/a&gt;
                  &lt;p class="retailer"&gt;
  
                      CHECK ME
  
                  &lt;/p&gt;
                  &lt;p class="brand"&gt;&lt;/p&gt;
              &lt;/li&gt;
              &lt;li class="price"&gt; … &lt;/li&gt;
              &lt;li class="name" title="one item 5"&gt; … &lt;/li&gt;
              &lt;li class="first-seen"&gt; … &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li class="product one-col new"&gt; … &lt;/li&gt;
      &lt;li class="product one-col new"&gt; … &lt;/li&gt;
      &lt;li class="product one-col new"&gt; … &lt;/li&gt;
      &lt;li class="product one-col new"&gt; … &lt;/li&gt;
      &lt;li class="product one-col new"&gt; … &lt;/li&gt;
      &lt;li class="product one-col new"&gt; … &lt;/li&gt;
      &lt;li class="product one-col new"&gt; … &lt;/li&gt;
  </code></pre>
  
  <p>I have tried this</p>
  
  <pre><code>browser.find_element_by_css_selector("ul[id='product-list']  li:nth-of-type(1)").click()
  </code></pre>
  
  <p>but it does not work?</p>
  
  <p>any idea?</p>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>the correct path was</p>
  
  <pre><code>browser.find_element_by_css_selector("ul#product-list &gt; :first-child").text
  </code></pre>