0

I am executing the test on Behat+Mink+Selenium. Below is the code which is have added in the FeatureContext.php:

 /**
     * @Given /^\|I am on "([^"]*)"$/
     */
    public function iAmOn($arg1)
    {
        $this->visit($arg1);
    }

Below is the error which i am getting:

Feature: Drupal.org search
  In order to find modules on Drupal.org
  As a Drupal user
  I need to be able to use Drupal.org search

  @javascript
  Scenario: Searching for "behat"              # features\test1.feature:7

PHP Fatal error:  Call to a member function getSession() on null in C:\Behat Demo1\vendor\behat\mink-extension\src\Behat\MinkExtension\Context\RawMink
Context.php on line 103

Fatal error: Call to a member function getSession() on null in C:\Behat Demo1\vendor\behat\mink-extension\src\Behat\MinkExtension\Context\RawMinkConte
xt.php on line 103

Please help.

  • probably same problem were in this [question](http://stackoverflow.com/questions/14629942/call-to-a-member-function-getsession-on-a-non-object-in-vendor-behat-mink-exte) You should make sure that your configuration file loading while starring behat tests – Igor Lantushenko Apr 28 '15 at 20:29
  • .yml file is in root of the project. Please tell me how can i verify that configuration file is successfully loaded before starting behat. – user2617223 Apr 29 '15 at 08:33

0 Answers0