title: I am trying to get the XPath for a drop down
body: <p>I am trying to get the XPath for a drop down field which I can use in my Webdriver, Python code.
  There are two drop down fields in the html.  I need to identify the drop down which has the options, Person Name, Organisation Name, Address etc.
  I would like to select Address value from the drop down.</p>
  
  <p>I have tried the following XPath:</p>
  
  <pre><code>//select[@class="gwt-ListBox marginbelow"]
  </code></pre>
  
  <p>It identifies both the drop down fields. </p>
  
  <pre><code>    &lt;div class="clear"&gt;
      &lt;span class="gwt-InlineLabel marginbelow myinlineblock" style="width: 8em;"&gt;Type&lt;/span&gt;
      &lt;select class="gwt-ListBox marginbelow" style="display: inline;"&gt;
          &lt;option value="Person name"&gt;Person name&lt;/option&gt;
          &lt;option value="Organisation name"&gt;Organisation name&lt;/option&gt;
          &lt;option value="Address"&gt;Address&lt;/option&gt;
          &lt;option value="Date"&gt;Date&lt;/option&gt;
          &lt;option value="Email"&gt;Email&lt;/option&gt;
          &lt;option value="Phone"&gt;Phone&lt;/option&gt;
          &lt;option value="Integer"&gt;Integer&lt;/option&gt;
          &lt;option value="Numeric"&gt;Numeric&lt;/option&gt;
          &lt;option value="String"&gt;String&lt;/option&gt;
          &lt;option value="User-defined"&gt;User-defined&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  &lt;div class="clear"&gt;
  &lt;div class="clear"&gt;
  &lt;div class="clear"&gt;
  &lt;div style="display: none;" aria-hidden="true"&gt;
  &lt;div class="clear"&gt;
      &lt;span class="gwt-InlineLabel marginbelow myinlineblock" style="width: 8em;"&gt;TestDB&lt;/span&gt;
      &lt;select class="gwt-ListBox marginbelow" style="display: inline;"&gt;
      &lt;option value="paf_uk15051"&gt;paf_uk15051&lt;/option&gt;
  &lt;/select&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I will then use the XPath like this, e.g.</p>
  
  <pre><code>from selenium.webdriver.support import By
  from selenium.webdriver.support.ui import select
  
  data_objects_element_Type.Select(self.driver.find.element(By.XPATH, '//select[@class="gwt-ListBox marginbelow"]'))
  data_objects_element_Type.select_by_visible_text(("Address"))
  </code></pre>
  
  <p>Thanks for suggestions.
  Riaz</p>