title: Use selenium to input multiple elements using xpath
body: <p>I'm new to Selenium so I'm not sure if this is the best way to approach the problem, but I'm looking for a way to use xpath (or css) to locate a series of input elements and somehow iterate over all of them and input some text into them.</p>
  
  <p>Something like the following:</p>
  
  <pre><code>&lt;form&gt;
    value1 &lt;input type="text" placeholder="value1"&gt;&lt;br&gt;
    value2 &lt;input type="text" placeholder="value2"&gt;&lt;br&gt;
    value3 &lt;input type="text" placeholder="value3"&gt;&lt;br&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am able to locate the elements using this:</p>
  
  <pre><code>var input = driver.findElement(By.xpath("//input[@type='text']"))
  </code></pre>
  
  <p>I can input the first occurrence of the element found by xpath with the following:</p>
  
  <pre><code>input.sendKeys('Some text')
  </code></pre>
  
  <p>That's where I get stuck.  I'm not sure how to enter values into the input fields after the first.</p>
  
  <p>Ultimately, what I'd like to do is somehow send the text to all of the input fields located by the xpath filter.  I was thinking it might be possible with a for loop but I'm not sure how to do it with the promise manager that webdriverjs uses.</p>
  
  <p>Is this possible or is there a better way to do this?</p>