Open WillGibson opened 4 years ago
I have same problem when I added behatch context to my behat config file
extensions:
Behat\MinkExtension:
...
Behat\Symfony2Extension: ~
Behatch\Extension: ~
When I remove last line my @javascript
tests working well again
There is also a PR for this: #292
@miedzikd This problem occures based on implementation of used Behat\Mink\Driver\DriverInterface
.
E.g. https://github.com/minkphp/MinkSelenium2Driver/blob/36c33585f62ffe1d791c5db838d1457522b3b382/src/Selenium2Driver.php#L485 has no check if $this->wdSession
is set or startet.
public function getContent()
{
return $this->wdSession->source();
}
As a solution you can switch to one of the existing behat panther extensions like https://github.com/robertfausk/behat-panther-extension and discard the slow selenium one :wink:
I did a wholesale
composer update
then started getting......which happens in
\Behat\Mink\Driver\Selenium2Driver::getContent()
when\Behat\Mink\Driver\Selenium2Driver::$webDriver
isnull
.I've done a little thing in a PR (https://github.com/WillGibson/contexts/pull/1/files) just to keep my project moving.
I'm not sure whether the issue is best addressed in
\Behatch\HttpCall\HttpCallListener::afterStep()
or\Behat\Mink\Driver\Selenium2Driver::getContent()
so would welcome some opinion.