Let’s consider this particular project where we will try automating the process of booking a flight ticket.
Let’s get started and see how it’s done using Selenium.
First, divide the process into the various steps to understand working in brief of a project.
Steps in brief:
We’ll start with initializing the browser driver and then log in to the web page
Find the flight according to the user requirements
Select a flight and book it
Capture a screenshot of the confirmation page
Now let’s have a look at the steps involved in the creation of this project.
Step 1: Create a Workspace
Step 2: Create a Maven Project in the above workspace
Go to File-> Go to New-> Others -> Maven Project to create a new Maven Project.
Step 2: Add the dependencies to pom.xml file
Now add the dependencies to pom.xml file
Step 3: Create the packages
Create the packages under the src/main/java folder and the src/test/java folder and start writing the piece of code.
Step 4: Setup the TestRunner class
Step 5: Create features in SpiceJet.feature
Now create a feature in SpiceJet.feature file.
Step 6: Create features in SpiceJetStepDefs.java
In SpiceJetStepDefs.java create the step definitions as per your features that you created in SpiceJet.feature.
That’s how we create a Maven Cucumber Project in Eclipse.
Thanks for Reading !!!
If you have any questions let me know in the comment section.