Cucumber is a popular BDD tool that runs executable specifications written in Gherkin. It maps plain-language steps in feature files to automation code (step definitions), producing tests that read like documentation.
Cucumber parses .feature files written in Gherkin, matches each step to a step-definition method (the 'glue' code) via annotations, and executes them, producing readable reports. It supports many languages (Java, JavaScript via CucumberJS, Ruby, etc.) and integrates with JUnit/TestNG and Selenium/Playwright for the actual automation. Cucumber itself does NOT automate the browser — it orchestrates plain-language scenarios and delegates the doing to your automation library in the step definitions. Its strengths are living documentation and business readability; its cost is the extra glue layer, which is only worth it when non-technical stakeholders actually read the scenarios.
A .feature file's step 'When the user logs in with valid credentials' is matched to a Java method annotated @When that calls the LoginPage Selenium code — Cucumber ties the sentence to the action.
Does Cucumber automate the browser by itself? Explain what it actually does.