title: How to select a <li> item from a <ul> by findElememt(By.xpath("locator"));
body: <p>I am trying to automate the  and want the 2nd item to be selected when div is poped up,but not able to do..I want to select 'Mr.' instead of '--None--'.please help.Html code is</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="select-options popupTargetContainer uiPopupTarget uiMenuList uiMenuList--default uiMenuList--left uiMenuList-short" data-aura-rendered-by="191:2436;a" data-aura-class="uiPopupTarget uiMenuList uiMenuList--default uiMenuList--left uiMenuList-short" aria-labelledby="170:2436;a" style="width: 347.5px; max-width: 347.5px; min-width: 200px; opacity: 1; position: absolute; left: 311px; top: 74px;" id="191:2436;a"&gt;
   &lt;div class="select-options" role="menu" data-aura-rendered-by="185:2436;a"&gt;
    &lt;!--render facet: 186:2436;a--&gt;
    &lt;ul class="scrollable" role="presentation" data-aura-rendered-by="187:2436;a" data-scoped-scroll="true"&gt;
     &lt;!--render facet: 2466:0--&gt;
     &lt;li role="presentation" data-aura-rendered-by="2470:0" class="uiMenuItem uiRadioMenuItem" data-aura-class="uiMenuItem uiRadioMenuItem"&gt;
      &lt;a href="javascript:void(0);" data-aura-rendered-by="2471:0" role="menuitemradio" aria-disabled="false" tabindex="0" title="--None--" aria-checked="true" class="selected"&gt;&lt;b&gt;&lt;/b&gt;--None--&lt;/a&gt;
     &lt;/li&gt;
          &lt;li role="presentation" data-aura-rendered-by="2476:0" class="uiMenuItem uiRadioMenuItem" data-aura-class="uiMenuItem uiRadioMenuItem"&gt;
      &lt;a href="javascript:void(0);" data-aura-rendered-by="2477:0" role="menuitemradio" aria-disabled="false" tabindex="0" title="Mr."aria-checked="false"&gt;&lt;b&gt;&lt;/b&gt;Mr.&lt;/a&gt;
     &lt;/li&gt;
     &lt;li role="presentation" data-aura-rendered-by="2482:0" class="uiMenuItem uiRadioMenuItem" data-aura-class="uiMenuItem uiRadioMenuItem"&gt;
      &lt;a href="javascript:void(0);" data-aura-rendered-by="2483:0" role="menuitemradio" aria-disabled="false" tabindex="0" title="Ms."aria-checked="false"&gt;&lt;b&gt;&lt;/b&gt;Ms.&lt;/a&gt;
     &lt;/li&gt;
     &lt;li role="presentation" data-aura-rendered-by="2488:0" class="uiMenuItem uiRadioMenuItem" data-aura-class="uiMenuItem uiRadioMenuItem"&gt;
      &lt;a href="javascript:void(0);" data-aura-rendered-by="2489:0" role="menuitemradio" aria-disabled="false" tabindex="0" title="Mrs."aria-checked="false"&gt;&lt;b&gt;&lt;/b&gt;Mrs.&lt;/a&gt;&lt;/li&gt;
     &lt;li role="presentation" data-aura-rendered-by="2494:0" class="uiMenuItem uiRadioMenuItem" data-aura-class="uiMenuItem uiRadioMenuItem"&gt;
      &lt;a href="javascript:void(0);" data-aura-rendered-by="2495:0" role="menuitemradio" aria-disabled="false" tabindex="0" title="Dr."aria-checked="false"&gt;&lt;b&gt;&lt;/b&gt;Dr.&lt;/a&gt;
     &lt;/li&gt;
     &lt;li role="presentation" data-aura-rendered-by="2500:0" class="uiMenuItem uiRadioMenuItem" data-aura-class="uiMenuItem uiRadioMenuItem"&gt;
      &lt;a href="javascript:void(0);" data-aura-rendered-by="2501:0" role="menuitemradio" aria-disabled="false" tabindex="0" title="Prof."aria-checked="false"&gt;&lt;b&gt;&lt;/b&gt;Prof.&lt;/a&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here xpath of upper <code>&lt;div&gt;</code> is <code>html/body/div[9]</code> and Xpath for <code>&lt;li&gt;</code> is <code>html/body/div[9]/div/ul/li[3]/a</code> . So <code>driver.findElement(By.Xpath("html/body/div[9]"))</code>is located but the <code>&lt;li&gt;</code> is not selected automatically. As i want to select the Ms. which is <code>li[3]</code></p>