Selenium Beginner Tutorial 11 - How To Create JAR File

preview_player
Показать описание
Today we will learn:
------------------------------
1. How to create a runnable JAR

2. How to run the test from command line
-----------------------------------------------------------------

STEP 1 : Create a runnable jar from eclipse project

STEP 2 : Run the jar file from command line

References:

________ ONLINE COURSES TO LEARN ________

------------ UI TESTING ------------
------------ API TESTING ------------

------------ MOBILE TESTING ------------

------------ CI | CD | DEVOPS ------------

------------ VERSION CONTROL SYSTEM ------------

------------ PERFORMANCE TESTING ------------

------------ PROGRAMMING ------------

------------ IDE ------------

------------ MAVEN ------------

------------ OTHERS ------------

Keep Learning,
Raghav

----------- Connect with Raghav ------------

Like, Subscribe, Share
You can support my mission for education by sharing this knowledge and helping as many people as you can
Рекомендации по теме
Комментарии
Автор

U make everything look simple and easy to learn ..thanks Raghav

ammu
Автор

thanks for making this series .. its really awesome..Can you please add some videos on for input, submit,select and get return log, pass fail info, it will be more effective if you make a project for

sym-john
Автор

Hi raghav, it seems it would be very simple to learn selenium testing, but I would like to ask you to give a complete project automation testing example.

abhiramya
Автор

Hi sir, so once u had created a runnable jar, then it will create a jar on the present version of code right and then when you run the jar from the cmd, the getProperty() and setProperty() method get the value from the config, properties file of the jar right, here comes the question u had changed browser to firefox and ran the jar, why did the firefox browser open normally it should open the chrome browser right the method reads the value from jar's config, properties file right

karanamravikarthik
Автор

Thank you Raghav for all the useful videos. It is a real help for beginners like me.

I created the executable jar file and getting error when running through command prompt.

In the config file when I put Firefox, the test is running successfully
when I put Chrome, it is giving driver executable doesnt exist error.

Note: Both the browsers opening perfectly when I run from eclipse.

DilshaSajan
Автор

Hi Raghav, thank for this tutorial.
I am facing an issue while creating jar file of my Selenium maven testng project.
My project is running locally fine but after creating jar, it says unable to locale my property files or testng any resources.

I am following following structure-

Src/Main/java- where all Java code
Src/main/resources- where all excel sheet, properties file config file aare stored.
I am passing path by key value pair .
Please help seriously stuck in this jar creations.

dikshasingh
Автор

Thanks for sharing

I have a gradle Project and i want to create executable jar via command line. Can you help me how can i create.

anoopsharma
Автор

Hi Raghav, the test is not running in firefox from the command line, works fine with chrome.
Exception in thread "main" Cannot invoke because is null
at
at
In eclipse both are working.
Can you help me solve this?

anshifasherin
Автор

How can I run the jar file without placing the jar file inside project location as I can see it wraps the entire project into jar file. Path location of properties file, data file uses relative path using so when i place the jar file in desktop and run via command prompt it takes the desktop path followed by the relative path of the file. How can I access the file path which is inside jar file.

ramv
Автор

Hi am unable to select launch configuration while making a runnable jar file. how I will do this?

attitudelove
Автор

Nice and understandable video . How can we convert Cucumber BDD framwork to jar file and run from commandline

sijijaison
Автор

I have 1 question, what if i do not have a main method, because i am using TestNG annotations, which class would be my main method? thanks

KeepItSimpleStupidMX
Автор

Hi Raghav, Thanks alot for sharing such an excellent video with us. I have an issue while I was running runnable jar file from other drive, its not able to find chrome driver as its not set in the path. So can you please advice me how should I overcome with such situation in the future? Best Regards, Dev

darshanmm
Автор

On my eclipse I am having bit problem with set-up runable jar as it is not showing all the lists of the name in Launch configuration box and also can't type the file destination in the Export destination box. Could you please explain it where I am wrong? Thanks.

knownothing
Автор

how can we create a jar for the Framework build using pageobjectmodel Factory since I don't have any mail class

sandeepnegi
Автор

Hi, i have this error no main manifest attribute. I've search for solution it says that i need to create something like manifest file? can you please explain it in comment and how to do it, thank you. And why i am experiencing it while i just follow all the steps that you did.

mikkeedamo
Автор

Hi Raghav,
Can we make jar file from command prompt or without making use of a IDE? Is it possible?

rimzhim_v
Автор

Hi raghav, by running test script in cmd line how we can make sure that test is passed or not?is there any way we can see result in html or some can file?

riaaggarwal
Автор

i created a jar file of a TestNG project and now when i am running the program from cmd it gives me " Could not find or load main class "xyz".jar" any idea why this error getting displayed. if possible provide me a link where i can get the resolution

subodhtalks-stocks
Автор

Is it possible to create testng report java executable jar file ...thank u .

varunps