I'm using the facebook webdriver with PHP Unit
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 '
$this->webDriver->findElement(WebDriverBy::id('Sessies'))->click();
$this->webDriver->getKeyboard()->sendKeys('Selenium');
This would just paste ' Selenium ' in the field but I want it to type:
S
then e
then l
and so on.
Is there anyway that I can do this besides:
$this->webDriver->getKeyboard()->sendKeys('S');
$this->webDriver->getKeyboard()->sendKeys('e');
$this->webDriver->getKeyboard()->sendKeys('l');
// and so on ...
EDIT: Trying out andrey's option below:
$var = 'Selenium';
for ($i = 0; $i<strlen($var); $i++) {
$character = substr($var, $i,1);
$this->webDriver->getKeyboard()->sendKeys($character);
}
Result = it sends the key ' m ' but that's all.