Не проходит тест в Codeception Selenium WebDriver
$I = new AcceptanceTester($scenario);
$I->amOnPage('/index.html');
$I->executeJS('return $(window).trigger($.Event("keydown", { keyCode: 39 }));');
Пишет ошибку
yuri@localhost /v/w/r/test (landing)> php ./vendor/bin/codecept run
Codeception PHP Testing Framework v2.1.2
Powered by PHPUnit 4.8.9 by Sebastian Bergmann and contributors.
Acceptance Tests (2) -----------------------------------------------------------
Perform actions and see result (GitHubCept) Ok
WelcomeCept Error
--------------------------------------------------------------------------------
Unit Tests (0) ------------------------------
---------------------------------------------
Functional Tests (0) ------------------------
---------------------------------------------
Time: 11.46 seconds, Memory: 13.50Mb
There was 1 error:
---------
1) WelcomeCept (tests/acceptance//WelcomeCept.php)
[Facebook\WebDriver\Exception\UnknownServerException] $ is not defined
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.1.6-200.fc22.x86_64+debug', java.version: '1.8.0_45'
Driver info: driver.version: unknown
Scenario Steps:
2. $I->executeJS("$(window).trigger($.Event("keydown", { keyCode: 39 }));")
1. $I->amOnPage("/index.html")
#1 /var/www/rabota.redcube.loc/test/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:287
#2 /var/www/rabota.redcube.loc/test/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:507
#3 /var/www/rabota.redcube.loc/test/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:286
#4 Codeception\Module\WebDriver->executeJS
#5 /var/www/rabota.redcube.loc/test/tests/_support/_generated/AcceptanceTesterActions.php:2312
#6 /var/www/rabota.redcube.loc/test/tests/acceptance/WelcomeCept.php:32
FAILURES!
Tests: 2, Assertions: 0, Errors: 1.
P.S. Простой JS код проходит тест
P.S.S. JQuery подключен в консоли браузера все нормально отрабатывает