title: PHP Unit Selenium Webdriver: How to send key by keystroke with sendKeys()
body: <p>I'm using the facebook webdriver with PHP Unit</p>
  
  <p>Due to some filtering issues in a table I want to be able to sendKeys but key by key. 
  Let's say I click on the field and I want to enter ' Selenium '</p>
  
  <pre><code>$this-&gt;webDriver-&gt;findElement(WebDriverBy::id('Sessies'))-&gt;click();
  $this-&gt;webDriver-&gt;getKeyboard()-&gt;sendKeys('Selenium');
  </code></pre>
  
  <p>This would just paste ' Selenium ' in the field but I want it to type:
  <code>S</code> then <code>e</code> then <code>l</code> and so on.</p>
  
  <p>Is there anyway that I can do this besides:</p>
  
  <pre><code>$this-&gt;webDriver-&gt;getKeyboard()-&gt;sendKeys('S');
  $this-&gt;webDriver-&gt;getKeyboard()-&gt;sendKeys('e');
  $this-&gt;webDriver-&gt;getKeyboard()-&gt;sendKeys('l');
  // and so on ... 
  </code></pre>
  
  <p>EDIT: Trying out andrey's option below:</p>
  
  <pre><code>$var = 'Selenium';
  for ($i = 0; $i&lt;strlen($var); $i++)  { 
  $character = substr($var, $i,1);
  $this-&gt;webDriver-&gt;getKeyboard()-&gt;sendKeys($character);     
  } 
  </code></pre>
  
  <p>Result = it sends the key ' m ' but that's all.</p>