Search code examples
webdriverselenium-webdriverentercodeception

Codeception pressKey ENTER does not work


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?


Solution

  • 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);