Download Cucumber and Selenium JARs

Download Cucumber and Selenium JARs

Welcome to the next article in our Cucumber tutorial series. In this article, you will learn how to download Cucumber jar files. This article will also show the steps on how to download Selenium Webdriver jars as well. Before we start with the download process, let us first have a look at why we need to download both Cucumber and Selenium jars?

Are you learning cucumber from scratch? Head over to our Selenium Cucumber Tutorial main page for the step by step cucumber setup guide

Why do you need to download both Selenium and Cucumber Jars?

Well, the answer to this question is very straightforward. If you recollect our article on Introduction to Cucumber BDD, you will see that Cucumber is a tool that helps you write your test scripts in BDD format. Cucumber doesn’t actually interact with the browser and perform actions in your website under test.

Interacting with the website, is the action that is performed by Selenium WebDriver. Due to this reason, you will need to download Cucumber as well as Selenium Webdriver jar files. Downloading Selenium Webdriver is pretty easy. You just need to download one zip file which contains all the jars. But with Cucumber, there are few different jars, all of which you have to download separately.

(adsbygoogle = window.adsbygoogle || []).push({});

Let us first start with the list of Cucumber jar files that you have to download.

Cucumber Jar files that you have to download

There are few core Cucumber jars and couple of additional dependent jars that you need to download to make it run correctly. Below, we list out all these jars together with the version numbers that we will use as part of this tutorial series:

  • cucumber-core-2.4.0.jar
  • cucumber-java-2.4.0.jar
  • cucumber-junit-2.4.0.jar
  • cucumber-jvm-deps-1.0.6.jar
  • gherkin-5.0.0.jar
  • junit-4.12.jar
  • mockito-all-1.10.19.jar

Important note: All the jar versions that we have provided above, are the latest ones as on 30 April 2018. We will update our articles as and when there are newer versions of these jar files.

Let us now have a look at the steps that you need to follow to download all these jar files.

Steps to download Cucumber Jars

You can download all the cucumber related jars from Maven Repository using the steps given below. We will give the detailed steps to download cucumber-core jar. You can then follow the same steps to download the remaining jars as well. The steps are given below:

1. Open Maven Repository using this link –

(adsbygoogle = window.adsbygoogle || []).push({});

MVN Repository home pageMVN Repository home page

2. Using the Search text box, search for cucumber-core. The result is shown in the image below.

Search for cucumber-core jar fileSearch for cucumber-core jar file

In the above image, you have to look for the file name which we have marked with the box. However, you will see that the same file name, cucumber-core, comes up 2 times in the search results. The first result is with the artifact id – info.cukes. And the second one is with the id io.cucumber.

Important Note: io.cucumber is the newer version of cucumber, and info.cukes is the older one. You can figure this out with the release date as well

So for all the cucumber related jars, wherever you see both io.cucumber and info.cukes, then please go for the version which use io.cucumber as its artifact id

3. Click on cucumber-core which has id io.cucumber. You will now see a page which shows different version of this jar file

Cucumber jars with 2 Artifact IdsCucumber jars with 2 Artifact Ids

4. Click on the latest version to open it (always go with the latest version, unless its a beta version or some other intermediate one). You will now see the page as shown below

Cucumber core latest version in maven repositoryCucumber core latest version in maven repository

5. Click on jar link to download the jar file. You can now save the jar file on your machine.

download jar file from maven repositorydownload jar file from maven repository

6. Follow the same steps to download the remaining jar files (with io.cucumber wherever you find both io.cucumber and info.cukes).

Please note that you will not find io.cucumber/info.cukes for junit and mockito jars. This is because these 2 jars are not part of the main cucumber library. These are external dependencies which cucumber needs in order to run correctly.

We have downloaded all the jar files and kept it together at a single place as shown below

Download Cucumber - All cucumber jars files downloadedDownload Cucumber - All cucumber jars files downloaded

We have finished downloading all Cucumber related jars. Let us now download Selenium Webdriver jars.

Download Selenium Webdriver Jar files

Unlike Cucumber, you don’t need to download all the Selenium jar files one by one. Its just a single compressed file which contains all the jars. Follow the steps given below to download the latest version of Selenium WebDriver –

1) Open Selenium download section using this link –

2) Scroll down a bit. You will see a section called Selenium Client & WebDriver Language Bindings. Here you will see download links next to different languages such as Java, C#, Ruby etc. Since we will be using Java with Selenium, you will need to download Java specific drivers. To do so, click on Download from the Java section

Selenium WebDriver 3.9.1 (Java)Selenium WebDriver 3.9.1 (Java)

3) Selenium Webdriver jars would start downloading. The file size is around 8 MB

4) Once the file is downloaded, unzip it. We are using 7-zip to extract the files, but you can use any extractor of your choice

Selenium WebDriver Unzip contentSelenium WebDriver Unzip content

5) Open the unzipped folder. It would look something like this. The jar file names might change depending on the version you are downloading. Generally speaking, you should find a libs folder and one or two other jar files in the Selenium folder. You would also see some other files such as LICENSE, NOTICE etc.

Selenium WebDriver Latest Version - Contents after UnzipSelenium WebDriver Latest Version - Contents after Unzip

With this, we have completed the download process of the latest version of Selenium Webdriver.

What’s next?

Our article to download Cucumber and Selenium Webdriver jar files finishes here. In our next article, we will show you how to create a new project in Eclipse for Cucumber. Let us know if you liked this article. If you have any other feedback, please feel free to share it with us using the comments section.

Next Article: Create new Cucumber project in Eclipse and add the jar files



Leave a Reply

Your email address will not be published. Required fields are marked *