title: Iterating elements using NightWatchJS
body: <p>How do i click a button returned by elements command in night watch</p>
  <pre><code>client.elements('xpath', &quot;.//a[@class='abcd')]&quot;, function (allButtons){
          console.log('Element value is '+element)
          allButtons.value.forEach(function (element) {
              this.elementIdClick(element, function(res){});
      }
  }
  </code></pre>
  <p>While running i am getting an error as</p>
  <blockquote>
  <p>Element value is [object Object]</p>
  <pre><code>TypeError: Object #&lt;Object&gt; has no method 'elementIdClick'
  </code></pre>
  </blockquote>
  <p>So how do i get each element from the element list returned by <code>client.elements</code></p>
  <p>I realized the parameters for elementIdClick is wrong, i updated the code as</p>
  <pre><code>client.elements('xpath', &quot;.//a[@class='abcd')]&quot;, function (allButtons){
  
  allButtons.value.forEach(function (element) {
      console.log('Element value is '+element)
      this.elementIdClick(this.elementIdAttribute(allButtons.value[element].ELEMENT, 'id'), function(res){});
  </code></pre>
  <p>Now the error is</p>
  <pre><code>Element value is [object Object]
      TypeError: Cannot read property 'ELEMENT' of undefined
  </code></pre>
  <p>So again back to original question. How do i get individual elements from a list of webelements using nightwatchJS</p>