title: Can I test the tab order of a page with PHPUnit_Extensions_Selenium2
body: <p>I want to test the tab order of my input fields on my page and I thought I could make it look something like this:</p>
  
  <pre><code>#get the number of inputs on the page
  $input = $this-&gt;elements($this-&gt;using('css selector')-&gt;value('div.wrapper input'));
  
  for ($i=1; $i &lt;= count($input); $i++) 
  { 
      #just to set focus on the field i know is the first
      if($i == 1)
      {
      $this-&gt;byId('myFirstField')-&gt;value($i);
      }   
      else
      {
      $this-&gt;keysSpecial('TAB');
      $this-&gt;get current element in focus-&gt;value($i);
      }       
  }
  </code></pre>
  
  <p>Then I can either sit there and see the numbers are written in the right order or fully automate it and assert that the value is correct for every field like so:</p>
  
  <pre><code>$this-&gt;assertEquals($this-&gt;byId('myFirstField')-&gt;value(), 1);
  $this-&gt;assertEquals($this-&gt;byId('mySecondField')-&gt;value(), 2);
  </code></pre>
  
  <p>And so on, but as you can se this code wont work, I dont know how to tell phpunit to type something in the current input field. is there a method for calling the element in focus? ie $this->inFocus()->value($i); ?</p>
  
  <p>and btw I can't use $input[$i-1]->value($i); because the tab order and the index of the fields will not be the same.</p>