title: XPath selector for list item inside div
body: <p>I am using selenium to test a site. I am using XPath selector to get to an item. This is how the HTML looks:</p>
  
  <pre><code>&lt;div id="boundlist-1051" class="x-boundlist list_cfg_cls x-boundlist-floating x-layer x-boundlist-default" tabindex="-1" style="left: 1096px; top: 318px; width: 370px; z-index: 29001; height: auto;"&gt;
      &lt;div id="boundlist-1051-listEl" class="x-boundlist-list-ct" style="overflow: auto; height: auto;"&gt;
          &lt;ul&gt;
              &lt;li role="option" class="x-boundlist-item"&gt;User name&lt;/li&gt;
          &lt;/ul&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>From the upper most div which contains a class by name <code>list_cfg_cls</code>, I need to navigate to <code>&gt; div &gt; ui &gt; li.</code></p>
  
  <p>This is what I am using but getting some error:</p>
  
  <pre><code> driver.FindElement(By.XPath("//div[contains(@class='list_cfg_cls')]/div/ul/li")).Click();
  </code></pre>
  
  <p>I am using XPath selector: "<code>//div[contains(@class='list_cfg_cls')]/div/ul/li</code>"</p>
  
  <p>I will have only one item under list. </p>