3

I am seeing the following dependencies under Maven repository

  1. selenium-java
  2. selenium-api
  3. selenium-support
  4. selenium-server
  5. 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:

  • selenium-api
  • selenium-support

Whenn should we use them?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Gokul
  • 177
  • 1
  • 8

1 Answers1

3

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:

Selenium_Maven_Dependencies

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

selenium-api artifact contains the following:


selenium-support

selenium-support artifact contains the following:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352