我正在对Behat + Mink + Selenium执行测试。下面是FeatureContext.php中添加的代码:
/**
* @Given /^\|I am on "([^"]*)"$/
*/
public function iAmOn($arg1)
{
$this->visit($arg1);
}
以下是我得到的错误:
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
请帮忙。