title: Selecting Nth-of-type in selenium
body: <p>I'm trying to use By.cssSelector to grab the nth dom element with class c3 with a structure like this:</p>
  <pre><code>&lt;div class=&quot;c1&quot;&gt;
      &lt;div class=&quot;c2&quot;&gt;
          &lt;div class=&quot;c3&quot;&gt;...&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;c1&quot;&gt;
      &lt;div class=&quot;c2&quot;&gt;
          &lt;div class=&quot;c3&quot;&gt;...&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;c1&quot;&gt;
      &lt;div class=&quot;c2&quot;&gt;
          &lt;div class=&quot;c3&quot;&gt;...&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Testing my CSS selectors, I'm becoming increasingly confused.
  This selector selects the 2nd instance of c2/c3 correctly:</p>
  <pre><code>.c1:nth-of-type(2) 
  </code></pre>
  <p>while:</p>
  <pre><code>.c2:nth-of-type(2)
  .c3:nth-of-type(2)
  </code></pre>
  <p>select nothing.</p>
  <p>Even worse, translating this into selenium, I seem to consistently find nothing for all 3 versions. There are plenty of alternative ways to select these elements (I'll probably just do XPATH), but my lack of understanding on <code>nth-of-type</code> is driving me crazy. Can anyone offer insight to why the second 2 don't work or correct my basic lack of comprehension on this selector?</p>
  <p>This has been in Chrome (29/30) and Firefox (24/25)</p>