I'm struggling a bit with codeception right now. I work on a laravel 4 project. From now on we used PhpUnit to uni test normally but we have too much Javascript in our pages to do acceptance tests with a simple DomCrawler it's a non sense. First i installed selenium + chrome on a vagrant VM. Took me some times but i managed to get it to work, meaning i can browse the Webdriver webpage (/wd/hub) then create a new session using chrome with success.
Next i installed codeception via composer I did
codecept bootstrap
I added Laravel4 as a module to acceptance.suite.yml
class_name: AcceptanceTester
modules:
enabled:
- WebDriver
- AcceptanceHelper
- Laravel4
config:
WebDriver:
url: 'https://192.168.33.10/'
browser: 'chrome'
I did a codecept build. Then i wrote a very simple acceptanceTest just to check if everything works :
$I = new AcceptanceTester($scenario);
$I->am('a member');
$I->wantTo('connect');
$I->amOnRoute('login');
$I->see('someText');
When i do a codecept run it raises an error on screen :
[LogicException] You must call one of in() or append() methods before iterating over a Finder.
In the Selenium WebDriver Page , it says a chrome session has been created.
I made some searches about thet error. It comes from the Finder component of Symfony.
Can someone helps me ?