When I run behat testscenario:

@api
Scenario: Create a node
Given I am logged in as a user with the "administrator" role
When I am viewing an "article" content with the title "My article"
Then I should see the heading "My article"

I am getting following error.
No ability to create nodes in Drupal\Driver\DrushDriver. Put `@api` into your feature and add an API driver (ex: `api_driver: drupal`) in behat.yml. (Drupal\Driver\Exception\UnsupportedDriverActionException)

Comments

ushashree_m created an issue.

johnreytanquinco’s picture

Can you post your behat.yml content?

shwetaneelsharma’s picture

Drupal extension in Behat has 3 drivers - Blackbox, Drupal API, and Drush. You can see a quick comparison listed on this page. So, Drush driver doesn't have the ability to create nodes, so you change your behat.yml to point to the drupal_api driver like this https://behat-drupal-extension.readthedocs.io/en/3.1/drupalapi.html
Also, make a note of this point - With the drupal_api driver, you can only execute scripts on your local instance and not on a remote server. To conclude, if you are executing scripts on a local instance, go ahead with the drupal_api driver or else switch to drush driver and use steps supported by it.