- Download Selenium Jar
- Download Selenium Jars For Java
- Download Selenium Java Jar File
- Selenium Jar File Download
Hello Everyone, in this post will learn how to download Selenium dependencies using Gradle.
Go to eclipse and create a new Java Project. Right click on project folder and click on Configure Build path. Go to the Libraries tab and click on Add External Jars and then all the necessary selenium jars downloaded. Download selenium-java-2.3.0.jar. Selenium-java/selenium-java-2.3.0.jar.zip( 301 k) The download jar file contains the following class files or Java source files.
Selenium dependencies/JAR files are required to run a web automation testing in IntelliJ. Downloading the libraries and adding those to the project’s build path one by one is a tedious and time-consuming process. To overcome this problem, we are going to use Gradle, a powerful build management tool which helps in the automatic download and configuration of dependencies or other libraries.
Pre-requisite :
- Download and Install JAVA
To download Selenium dependencies, we need to create a Gradle project in IntelliJ.
Create New Gradle Project in IntelliJ
Step 1: Launch IntelliJ by double-clicking the application
Step 2: Click Create New Project
Step 3: In the next screen,
- Select Gradle
- IntelliJ automatically adds Project SDK (JDK)
- JAVA (Default option)
- Click Next
Step 4: Enter ArtifactId and Click Next
Note: ArtifactId is basically our Project Name
Step 5: In the next screen,
- Select auto-import (Option to resolve all changes made to Gradle project automatically)
- Select Create separate module per source set (Default Option)
- Use default Gradle wrapper (Default option)
- Click Next
Step 6: Click Finish
Step 7: New Gradle Project has been created successfully. Project Structure should exactly look similar.
Download Selenium Dependencies
Following Selenium dependencies are required to run an automation test,
- Selenium Java
Step 1: Open the build.gradle file
Step 2: Let’s understand the build.gradle file quickly. Two important sections to note down are,
- Repositories
- Repositories section has the name of the remote repository that is used to search for dependencies. Gradle supports Maven and Ivy repository to look for dependencies.
- Dependencies
- Dependencies section has the entry to the dependencies. This triggers Gradle to download the libraries/JAR files during the gradle build from the remote repository specified in the repository section.
Download Selenium Jar
Step 3: Navigate to https://mvnrepository.com/
Step 4: Search for ‘Selenium’ in the search box and click Search
Step 5: You should see the search results as below,
Step 6: Click Selenium Java -> Select latest version – > Select Gradle tab
Step 7: Copy the text and paste in the build.gradle file under the dependencies section
2 | //https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java compile group:'org.seleniumhq.selenium',name:'selenium-java',version:'3.141.59' |
After you pasted the code, Gradle automatically triggers the selenium dependency download and add the required Selenium JAR files to the project. Selenium JAR files are found under External Libraries section.
Download Selenium Jars For Java
Step 9: build.gradle file should exactly look similar.
Selenium Dependencies are downloaded successfully!
Troubleshooting tips
If dependencies are not downloaded,
- Check the auto-import option for Gradle in Preferences/Settings screen.
- Try using ‘jcenter()’ instead of ‘mavenCentral()’ under the repositories section in the build.gradle file
Download Selenium Java Jar File
Know anyone who would like to learn Cucumber (BDD) Automation Testing tool for enhancing their career? Let them know by sharing this article on Facebook, Twitter, or Google Plus.
Selenium Jar File Download
Nested Class Summary
Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver
RemoteWebDriver.RemoteTargetLocator, RemoteWebDriver.RemoteWebDriverOptions, RemoteWebDriver.When
Nested classes/interfaces inherited from interface org.openqa.selenium.mobile.NetworkConnection
NetworkConnection.ConnectionType
Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver
WebDriver.ImeHandler, WebDriver.Navigation, WebDriver.Options, WebDriver.TargetLocator, WebDriver.Timeouts, WebDriver.Window
Constructor Summary
Constructors Constructor Description EdgeDriver()
EdgeDriver(Capabilities capabilities)
EdgeDriver(EdgeDriverService service)
EdgeDriver(EdgeDriverService service, EdgeOptions options)
EdgeDriver(EdgeOptions options)
Method Summary
Methods inherited from class org.openqa.selenium.chromium.ChromiumDriver
executeCdpCommand, getCastIssueMessage, getCastSinks, getDevTools, getLocalStorage, getNetworkConnection, getSessionStorage, getTouch, launchApp, location, onLogEvent, quit, register, selectCastSink, setFileDetector, setLocation, setNetworkConnection, setPermission, startTabMirroring, stopCasting
Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver
addVirtualAuthenticator, builder, close, execute, execute, execute, executeAsyncScript, executeScript, findElement, findElement, findElements, findElements, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getKeyboard, getMouse, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, removeVirtualAuthenticator, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFoundBy, setLogLevel, setSessionId, startSession, switchTo, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.openqa.selenium.HasAuthentication
register
Methods inherited from interface org.openqa.selenium.JavascriptExecutor
executeScript, getPinnedScripts, pin, unpin