Skip to main content

Hands On Maven (First Project)

What is Maven?

Maven is an automation build tool which is based on POM (Project Object Module).
Maven has so many feature, we will discuss it later. As of now lets create our first project.


Steps to be followed:
  1. File -> New Project
  2. Click Maven -> Maven Project -> Next
  3. Check Create Simple Project -> Next
  4. Type in Group Id 
  5. Type in Artifact Id (It is your project name) 
  6. As soon as you crated a project it will take time to load maven settings. Once loaded you can see the project structure in Package Explorer
  7. Now double click on pom.xml and select the pom.xml tab in right hand side
  8. After the version tag add the maven dependencies

  9. As soon as you added the dependencies and save the file (CTRL + S) it will starts downloading required files from Maven repo
  10. Once the downloaded are completed you able to see a Maven Dependencies in the Package Explorer
Advantage of Maven:
  • Single dependency will internally call others required dependencies
  • It is very easy to maintain
  • If newer version is released no need to change all the corresponding jar files instead of the that just change the version number in pom.xml
  • Maven is very stable 
That's all for now!
In next tutorial we will see how to set all drivers to launch browser

Spread the Love! Share post ♥ Comments are always welcome
Thanks for being here!
Happy learning!

Comments

Popular posts from this blog

Download Files (PDF, exe) using FireFox

It is so obvious that we all know when ever we try to download files it open a new window where we have to locate the folder and save or by default it downloads in DOWNLOAD folder, and we all knew we cannot automate such scenario using Selenium. So what are the solution till day ? Using Java Robot Class Using AutoIt Using Sikuli Using Java Robot Class - Disadvantage: If other windows is opened it will type in the pointer which is not handy Using AutoIt - Disadvantage: It is not quite easy, we have to store an executable file and to do the operation which is time consuming Using Sikuli - Disadvantage: Sikuli works on the basis of pattern matching (OCR), If the Operating System changes then it will not work. It is very time consuming How about if we can do the task using Selenium itself  ?  Let's have a look on the code: Check out this link to download using Chrome Click Here ! That's all for now! Spread the Love! Share post ♥ Comments are...

Launching Browser

To begin with our first code, let's organize our packages to make it better for viewing and understanding In eclipse every folder is known as Package Points to noted : 1) Package name starts with lower case 2) Class name Starts with upper case Let's create a package Let's create a Java Class Let's launch all browsers one by one: Chrome FireFox InternetExplorer