I am seeing the following dependencies under Maven repository
selenium-java
selenium-api
selenium-support
selenium-server
selenium-Firefox-driver
and so on.Link : https://mvnrepository.com/artifact/org.seleniumhq.selenium
While I understand the others, I am not able to understand the difference between the two:
Whenn should we use them?
If you're using Maven, you will find all Selenium Maven Artifacts directly in the Central Maven Repository
In order to start using any of the implementations in your Maven project, you just need to add the required dependency within your pom.xml
(current release being Selenium v3.141.59
):
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
The diagram below shows the dependencies between the different Selenium Maven Artifacts as well as the most important classes/interfaces in those artifacts:
If you know that you will only use a certain WebDriver implementation, e.g. the FirefoxDriver, you don't need to depend on the selenium-java
artifact (which has a lot of transitive dependencies). Instead you can just add the firefox-driver
dependency on the artifact you need.
selenium-api artifact contains the following:
selenium-support artifact contains the following: