How to run a Maven project in Selenium?

What is the use of POM xml in Selenium?

Can somebody explain ?

It's written in Java. It means that you are running on a "headless" environment. The difference between a "headless" environment and a "GUI" environment is that a "headless" environment does not use any graphical interface for interacting with the web application you are testing, whereas a "GUI" environment uses a GUI, which provides a "windowed" interface to interact with the web application (most of the time).

However, you can use a "headless" environment for your Selenium tests, because you can write your tests in a different language (like Java) and run them on a "headless" environment using the POM syntax. It allows you to have "headless" tests without having to change your IDE to use a "GUI" environment (which is not always possible).

A good introduction to "headless" environments is here.

What is Maven and TestNG in Selenium?

What is the relationship between Maven and TestNG?

Is Maven part of TestNG? Maven is a build tool which can build applications by using java. And testNG is an test framework for writing automated tests.

Maven is used for managing dependencies, TestNG is used for writing automated tests. More on this in : It's basically same but TestNG supports test cases in xml format and maven provides all sort of dependency management so that we can easily add dependencies and use these dependencies for creating jar and other things.

How to run a Maven project in Selenium?

After writing integration tests with Selenium in my company, I started to wonder about using this framework in more projects.

Also, I have experience in developing desktop applications but there is no a similar type of work for running integration tests with Selenium.

My question is how to setup such test suite with Maven? I am quite familiar with the way how to create new Java project with Maven (it does not matter if it is a web or J2EE project) and I can run it with Selenium RC. But when I try to add Selenium RC dependencies in pom.xml - something goes wrong. So my question is: What is the best way to add Selenium dependencies (selenium-java and selenium-server-standalone-2.43.0 or some other versions)? Do I need Jenkins?

If you go to. You can find the Remote Server version of the server on that site. Also on the same page you will find all the Selenium releases: Selenium 1, 2.x, 3. If you want to run selenium 3. Then use the latest version of selenium.

On that page you will also find some of the selenium releases which are compatible with selenium 2. You can get that here: (the link is a little old because the company went bankrupt).

Related Answers

How to use Maven with Selenium?

Object repository is a web-based API that allows you to store, retri...

How can we use the Selenium tool with HeadSpin?

Selenium is a tool that is used to automate functional testing. There are two types...

What are 5 Uses of Selenium?

Selenium is a web-automation tool that helps you to test web applications....