title: trouble making in xpath for "ul" html code in selenium webdriver
body: <p>HTML code:</p>
  
  <pre><code>&lt;div id="routingPanel" class=""&gt;
  &lt;div id="routingPanelRight"&gt;
  &lt;ul id="routingList" class="ui-sortable"&gt;
  &lt;li class="ui-menu-item ui-draggable" style="display: list-item;" role="presentation" data-type="srl" data-id="15"&gt;
  &lt;a class="ui-corner-all" tabindex="-1"&gt;AS-HTTS-US-LAN-SW&lt;/a&gt;
  &lt;span class="fa fa-trash"/&gt;
  &lt;span class="type"&gt;[srl]&lt;/span&gt;
  &lt;/li&gt;
  &lt;li class="ui-menu-item ui-draggable" style="display: list-item;" role="presentation" data-type="queue" data-id="119"&gt;
  &lt;a class="ui-corner-all" tabindex="-1"&gt;AS-EMEA-NORTH&lt;/a&gt;
  &lt;span class="fa fa-trash"/&gt;
  &lt;span class="type"&gt;[queue]&lt;/span&gt;
  &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I need to click on a button which is having the span class"fa fa-trash" but it is inside li class. And i have list on buttons on the page with li class changing.</p>
  
  <p>I am giving testdata from excel file so i can't use the direct value.</p>
  
  <p>i tried to use this xpath </p>
  
  <pre><code>.//*[@id='routingList']/li[5]/span[1] //testdata1
  .//*[@id='routingList']/li[2]/span[1] //testdata2
  </code></pre>
  
  <p>where li value changes everytime from excel file.</p>
  
  <pre><code>WebDriverWait wait = new WebDriverWait(driver, 15);
          wait.until(ExpectedConditions.visibilityOfElementLocated((By.xpath("//ul[@id='routingList']/li/span[1]")))).click();
  
          List&lt;WebElement&gt; options = driver.findElements(By.xpath("//ul[@id='routingList']/li/span[1]"));
          for (WebElement option : options) {
                if(testData.equals(option.getText()))
                  option.click();
  </code></pre>
  
  <p>Tried above code but it is deleting only one from the list ,where i have passed two more testdata that needs to be deleted.</p>
  
  <p>Need suggestions Please</p>