Selenium Java Installation Steps as Maven Project in Eclipse for Beginners

The video explains in detail how to setup Selenium-Java in eclipse as Maven Project for Beginners. Find the Questions and Answers for more details.
Q1) What softwares we need to have for Selenium learning setup?
Selenium can be written in one of the popular langugaes like Java, C#, Python, Js, Ruby ... However, here is the list of the software that you may need to have Selenium-Java learning.
Base : JDK 1.8 or above
IDE : Eclipse / IntelliJ / VSCode
Jar Files : Selenium 4.x, TestNg 7.x, Apache POI 5.x, Cucumber 7.x, Extent 5.x
Plugins : TestNG, Cucumber
Q2) What is minimum configuration should I have to have best learning?
It is nice to have a laptop or desktop with i5 or above with 8 GB RAM for smoother learning. However, it is okay to have i3 system with the minimum of 4 GB RAM and lesser than would not be the best fit for learning.
Q3) Why Java 8 is mandatory?
Selenium 4.x have features built based on Java 8; hence to use latest Selenium source, we need to have minimum Java 8 or you can have the latest Java versions as well. Please note that you can have multiple JDK in your machine; however, it is important to set path with the Java 8 or latest of your preference.
Q4) Is Eclipse mandatory? What other IDE is good?
Eclipse is preferred and it is the best IDE for Java development and it is the opensource IDE with so many plugins compared to other tools. TestLeaf recommends you to use Eclipse during learning; however, you can use other IDE of your choice.
Q5) What type of project to create and why?
Creating Maven project is preferred than other type of projects. The common reasons :-
a) It is easy to manage software dependencies with new versions
b) Most used project type in Java project world
c) Preferred for interview experience too
Q6) What is Maven?
Maven is a project management tool that is based on POM (project object model). It is used for building Java development or testing projects with dependencies and documentations.
Major Benefits:
a) It adds all necessary jars to project as per dependencies mentioned in pom.xml file.
b) It creates the standard project structure.
c) It makes automation project easy to build.
Q6) What dependencies mean?
Dependencies are the softwares (Jar files) required for the project for test automation development. Maven helps us to download dependencies, which refers to the libraries or JAR files. For example, when you like to change the selenium version from 3.x to 4.x, you can go and change in POM.xml and it gets downloaded automatically and get added to your project; whereas in Java (only) projects, you need to download manually and attach them.
Specially in the context where your customers or manual testing team do not know which software versions to use and where to download from, Maven dependencies can be handy.
Q7) Explain difference between Java and Maven Project?
In Java (only) Project, if you want to work on any software (like Selenium or TestNG) then you have to associate those jar files and associate/configure those jar files to your project manually, whereas in Maven project provide the dependency in POM file and it downloads, add them automatically to your project. It is simple and easy to manage !
Also you can create shippable / executable Selenium Project testing jar files with all your testcases written for your customers or your internal teams.
Q8) Explain about each dependencies?
Selenium WebDriver - The browser automation framework
WebdriverManager - The native browser driver management library
TestNG - The test execution framework
Cucumber - The Behaviourial driven development framework
Apache POI - The library for reading MS Office like excel
Extent Reports - The library for HTML reporting
Q9)I have errors in pom.xml. How should I handle?
The maven errors can be of different types. Firstly, read the error messages and based on the error, go through our documentation to resolve. However, the most common error message when maven is setup is to due to the incomplete download and that can be resolved by maven force update and that will initiate re-download of the maven project and dependencies. You can see the downloaded files under .m2 folder in your machine.
Q10)I use MAC / Linux, how should I setup the software?
Refer the documentation specific to MAC/Linux and it will help you to setup the required software in less than 60 minutes at max.
Q11)There are warnings after downloading the maven dependencies. What should I do?
The warnings are absolutely okay to live with for now. It will be detailed in the live classes.
Q12)How to know that my required software installation is complete?
Do the following check and confirm
1) Eclipse launches fine
2) Maven Project that you created has no errors
3) Maven dependencies are available on eclipse left panel
If all 3 are good, then you are done !

Пікірлер: 11

  • @rkr5073
    @rkr50732 жыл бұрын

    Very Nice Explanation Babu Sir & Vidhya Mam 👏👏👏😇

  • @AbdulHasan-jd7eq
    @AbdulHasan-jd7eq Жыл бұрын

    Great Tutorial

  • @nandhuswowlife8846
    @nandhuswowlife8846 Жыл бұрын

    Very useful 👍

  • @prathapn9961
    @prathapn9961 Жыл бұрын

    Sir I am getting a class not found exception in the maven project of basic prog . Can anyone help me out. Please

  • @MohamedIbrahim-el3do
    @MohamedIbrahim-el3do Жыл бұрын

    Amazing explanation by Babu 🤌✨👏

  • @TestLeaf

    @TestLeaf

    Жыл бұрын

    Glad you liked it

  • @shankarraj3433
    @shankarraj34334 ай бұрын

    Sir, after adding the dependency in pom.xml what should I do? Whether I have to 'Run As' - Maven Install (OR) 'Maven' - Update Project.

  • @TestLeaf

    @TestLeaf

    4 ай бұрын

    When you save it and update Maven Project. The dependencies will get loaded then

  • @srihariprasathR
    @srihariprasathR Жыл бұрын

    can you share the same steps for linux machines

  • @fifarg8538
    @fifarg85382 жыл бұрын

    link: drive.google.com/drive/folders/1tYFg26MVY35zmXwhQTdYaA2A1MhleWHT

Келесі