- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to make seleinum jar file , and how to test using Selenium jar file?
We can make a JAR file with the code created in Selenium and share it among others. The procedure to make a Selenium Jar file and to test it are listed in the below steps −
Step1 − Right-click on the Selenium project and click on Export.
Step2 − Select the option Runnable Jar under the Java folder. Then click on Next.
Step3 − Select the Java class for which we want to create a JAR in the Launch Configurations field. Enter the Export destination: field and select the option Extract required libraries into generated JAR. Then click on Finish.
Step4 − Click on the OK button available on the Runnable JAR File Export pop-up.
Step5 − The complete code of the project is converted into a JAR file and gets stored in the destination specified in the Step3.
Step6 − To test the JAR created, open the terminal and first navigate from the current directory to the path of the directory where the JAR is saved.
Step7 − Run the command: java -jar <JAR filename>.jar
Here, we have used the command java -jar Selenium Jar.jar to test our JAR.
- Related Articles
- How to create a JAR file?
- What is a JAR file?
- How to run a JAR file through command prompt in java?
- How to Open a Difficult Jar?
- How can we create a multi-release jar(mrjar) using jar tool in Java 9?
- Error connecting SAP while sapjco3.jar file is in my library path
- How to handle windows file upload using Selenium WebDriver?
- How to upload file with selenium (Python)?
- How to run tests using a test runner file for Cucumber?
- How to add jar as library on Android Studio?
- How to overwrite a file to hide file contents, and make original contents unrecoverable in Linux?
- How to convert JSON file to CSV file using PowerShell?
- How to download any file and save it to the desired location using Selenium Webdriver?
- How to make a txt file and read txt file from internal storage in android?
- How to install MSI file using batch file in PowerShell?