Codeception pressKey ENTER does not work

buerma picture buerma · Jun 13, 2013 · Viewed 9.1k times · Source

I am not familiar with codeception. I am trying to insert a text in an input field and press the ENTER button.

$I->fillField('#token-input-yw1', 'Some string');
$I->pressKey('#token-input-yw1', 13);

The text is entered but the enter key is not pressed. Any ideas?

Answer

pwl picture pwl · Oct 9, 2014

If anyone still have problem with pressing Enter key, here is a solution: (if you are using Webdriver with Selenium)

$I->pressKey('#input',WebDriverKeys::ENTER);