在Behat + Mink + Selenium上执行测试时出现致命错误

时间:2015-04-28 05:59:00

标签: php selenium-webdriver bdd behat mink

我正在对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

请帮忙。

0 个答案:

没有答案