title: Getting value from file and selecting the same value from dropdown using selenium webdriver
body: <p>I am facing this issue that i am trying to read from excel file and selecting the corresponding value from the dropdown on screen. Using the code:</p>
  
  <pre><code>cell = sheet.getRow(i).getCell(4);
  cell.setCellType(Cell.CELL_TYPE_STRING);
  WebElement dr = driver.findElement(By.xpath("//*[@id =\"select2chosen-3\"]"));
  dr.click();
  driver.findElement(By.xpath("//li/div[contains(.,cell.getStringCellValue())]")).click();
  </code></pre>
  
  <p>Getting this error from eclipse:</p>
  
  <blockquote>
    <p>org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression //li/div[contains(.,cell.getStringCellValue())] because of the following error:
    SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//li/div[contains(.,cell.getStringCellValue())]' is not a valid XPath expression.</p>
  </blockquote>