How can Cucumber be integrated with Selenium WebDriver?

Below are the steps you can follow to integrate Selenium with Cucumber:

Step 1: Create Java/Maven project

Step 2: Add Selenium jars and add Cucumber jars or add dependency for same in pom.xml. Check related content section for dependency or jar.

Step 3: Create feature file and write scenarios.

Step 4: Write TestRunner and execute the same.

Step 5: Once TestRunner execution complete, you will get all methods with default implementation (Copy all of them).

Step 6: Add Selenium code to step definitions which were generated automatically. 

Step 7: Download Chrome/Firefox or other drivers.

Step 8: Use cucumber hooks like @Before and @After.

Step 9: Add tags to scenario or feature files.

Step 10: Execute the Test Runner and check the result.

Step 11: Configure reporting.