@ciaranmcnulty Would you write steps inside FeatureContext.php using Application services that don't exist yet so that they fail first in the usual TDD fashion? And then start building them to fix the Behat scenarios?
Or with Behat, would the TDD equivalent be writing the scenarios without steps in the FeatureContext.php so that they fail but build the Application services etc before writing the Behat steps?
usleep
, as @stof sugested, and wait enough time (lets say, if it usually take 10 sec to do the query and to show the element, you could wait for 30 sec, but that's dirty, it will prove your concept, but dirty). Or you could implement some with $this->getDriver()->wait()
evaluating the javascript in charge to launch the element you are waiting for.
composer require behat/behat --dev
, after installation I try ./bin/behat
and I get this:uirapuru@uirapuru-tower:/var/www/new-calendar$ ./vendor/bin/behat
In ContainerBuilder.php line 1001:
You have requested a non-existent service "cli.output".
uirapuru@uirapuru-tower:/var/www/new-calendar$ php -v
PHP 7.2.5-0ubuntu0.18.04.1 (cli) (built: May 9 2018
#0 /var/www/ibm/vendor/dmore/chrome-mink-driver/src/DevToolsConnection.php(52): DMore\ChromeDriver\DevToolsConnection->waitFor(Object(Closure))
#1 /var/www/ibm/vendor/dmore/chrome-mink-driver/src/ChromePage.php(42): DMore\ChromeDriver\DevToolsConnection->send('Page.navigate', Array)