2

Why to include

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
     <artifactId>selenium-chrome-driver</artifactId>
     <version>3.9.1</version>
</dependency>

to the maven project if we still need to download the driver's binary? What is the advantage? What will happen if we change the version in dependency, but not download the new binary?

Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57
Vladimir
  • 630
  • 3
  • 12
  • 26

1 Answers1

2

The Selenium Maven Artifacts can be found in the Central Maven Repository. Now 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 selenium-chrome-driver dependency on the artifact you need.

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