Когда я нахожусь на этапе сценария аутентификации, Минк не может найти поля для заполнения.
Я использую Beat 3.5 и PHP 5.6.38.Весь стек композитора обновлен, включая Mink.
файл behat.yml:
default:
suites:
default:
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
extensions:
Behat\MinkExtension:
goutte: ~
selenium2: ~
base_url: 'localhost'
Drupal\DrupalExtension:
blackbox: ~
api_driver: 'drush'
drush:
alias: 'local'
root: 'C:\xampp2\htdocs\project'
drupal:
alias: 'local'
drupal_root: 'C:\xampp2\htdocs\project'
local:
extensions:
Behat\MinkExtension:
base_url: 'localhost'
Drupal\DrupalExtension:
api_driver: 'drush'
drush:
alias: '@self'
root: 'C:\xampp2\htdocs\project'
drupal:
drupal_root: 'c:\xampp2\htdocs\project'
Файл my.feature:
Feature: Login
In order to login
Authenticate as administrator
Submit form sucessfully.
@api
Scenario: Login and join community.
Given I am on "/user"
# Given I am logged in as a user with the "administrator" role
When I fill in the following:
| edit-name | bddtest |
| edit-pass | Behattest101 |
featureContext.php:
<?php
use Drupal\DrupalExtension\Context\RawDrupalContext;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\Behat\Tester\Exception\PendingException;
/**
* Defines application features from the specific context.
*/
class FeatureContext extends RawDrupalContext implements SnippetAcceptingContext {
/**
* Initializes context.
*
* Every scenario gets its own context instance.
* You can also pass arbitrary arguments to the
* context constructor through behat.yml.
*/
public function __construct() {
}
}
когда я запускаю> behat ... Когда я заполняю следующее: # Drupal \ DrupalExtension \ Context \ MinkContext :: fillFields ()
| edit-name | myusername |
| edit-pass | mypassword |
Form field with id|name|label|value|placeholder "edit-name" not found. (Behat\Mink\Exception\ElementNotFoundException)
1 scenario (1 failed)
5 steps (1 passed, 1 failed, 3 skipped)
I also tried "Username" and "Password" but with the same result.