I am using Behat and Mink with the Selenium2 driver, and I'm trying to type directly into a form field (simulating raw keyboard input), instead of using the
This is what I'm trying:
$element = $this->getSession()->getPage()->find('css', '#questionName'); $element->focus(); $element->keyPress('a'); // also tried this, with no success // $element->keyDown('a'); // $element->keyUp('a');
There is an
<input type="text" id="questionName"> element on the page. It correctly receives the focus, but does not respond to any of the simulated keyboard input.
Is it possible to simulate raw keyboard input like this?
What am I doing wrong?