title: Select a value from input combo box using Selenium using xpath for a reachjs control
body: <p>Hi Need to select "New South Wales" using <code>By.xpath()</code> any suggestions please?</p>
  
  <p>This is a reactjs page <a href="http://jedwatson.github.io/react-select" rel="nofollow noreferrer">jedwatson.github.io/react-select</a> </p>
  
  <pre><code>&lt;div class="Select-control"&gt;
      &lt;span class="Select-multi-value-wrapper" id="react-select-2--value"&gt;
          &lt;div class="Select-value State-NSW"&gt;
              &lt;span class="Select-value-label" role="option" aria-selected="true" id="react-select-2--value-item"&gt;New South Wales&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="Select-input" style="display: inline-block;"&gt;
              &lt;input role="combobox" aria-expanded="false" aria-owns="" aria-haspopup="false" aria-activedescendant="react-select-2--value" value="" style="width: 5px; box-sizing: content-box;"&gt;
              &lt;div style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-size: 14px; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-weight: normal; font-style: normal; letter-spacing: normal;"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/span&gt;
      &lt;span class="Select-clear-zone" title="Clear value" aria-label="Clear value"&gt;
          &lt;span class="Select-clear"&gt;×&lt;/span&gt;
      &lt;/span&gt;
      &lt;span class="Select-arrow-zone"&gt;
          &lt;span class="Select-arrow"&gt;&lt;/span&gt;
      &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Tried with the below code without success </p>
  
  <pre><code>driver.findElement(By.xpath("//input[@role='combobox'][@value='New York"']")).click();;
  </code></pre>
  
  <p>Below exception was observed</p>
  
  <pre><code>org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@role='combobox'][@value='New York']"}
    (Session info: chrome=59.0.3071.86)
  </code></pre>