title: org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been “select” but was “span”
body: <p>Selenium webdriver code is</p>
  
  <pre><code>WebElement element=driver.findElement(By.xpath(".//*[@id='css3menu1']/li[3]/a/span"));
          Select se = new Select(element);
          String S =se.getFirstSelectedOption().getText();
          System.out.println(S);
          List&lt;WebElement&gt; allOptions = se.getOptions();
          for (WebElement webElement : allOptions)
          {
              System.out.println(webElement.getText());
          }
          }
  </code></pre>
  
  <p>Here i want to print all options ..Please help me to get rid of this error and print all child options .</p>
  
  <p>org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been “select” but was “span”</p>