Write a Feature file for simple web interaction

  • Estimate Completion Time
    not found 30 minutes
  • Difficulty Level:

Write a feature file that describes opening a browser and navigating to https://google.com, validating the title, and then closing the browser.

Solution

Go to Eclipse IDE.

Create a New Maven Project.

Add Selenium and Cucumber dependencies to the pom.xml file

Right-click on the project > New > File. Name it “Google.feature”. The extension must be .feature

Google.feature
Feature: Simple Web Interaction
Scenario: Visiting google.com
Given Open Browser
When navigate to google.com
Then Validate the Google page is open
And Close the browser
Cucumber Practice Exercises - QA Ads Banner

Proleed Academy

Proleed serves / offers professionally designed IT training courses
globally.

Copyright © 2023 - Proleed Academy | All Rights Reserved.