Skip to main content

Run your first Behat script using Goutte driver

GoutteDriver provides a bridge for the Goutte headless browser. Goutte is a classical php headless browser which extends the BrowserKitDriver.

Step 1: To install GoutteDriver use below command

$ composer require --dev behat/mink-goutte-driver

Step 2: Configure behat.yml and enable GoutteDriver, check here

Step 3: Write below feature file

Feature: Login
  Scenario: Login with existing user
    Given I am on the homepage
    Then I follow "Sign in"

Step 4: Execute behat command

$ bin/behat

path may be different for you for behat command.

Submitted by tgoswami on September 27, 2020

Tarun has 11+ years of experience in Quality Assurance in different domains like Banking, E-commerce, Health and Education.


At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.