Cucumber – Integration with Selenium

In this tutorial, we will integrate Cucumber with Selenium WebDriver.

Let us consider a scenario to automate using Cucumber Selenium:

  • Navigate to Facebook website
  • Enter correct username and password
  • Click on sign in button
  • Verify that the user is navigated to the user’s homepage.

Feature File:

This file will have the test scenario which will cover the above steps in Gherkin format:

Step-Definition file:

This file consists of the test steps which are glued to the steps mentioned in the above gherkin language.

PS: For any questions, queries or feedback. Feel free to write us at or

Saurabh Dhingra

About the Author

Saurabh Dhingra

Follow Saurabh Dhingra: