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.
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 "java.lang.IllegalStateException" driver executable doesnt exist error. Note: Both the browsers opening perfectly when I run from eclipse.
chromedriver.exe is already installed and kept in lib\chromedrive folder. and add using the code if (browser.contains("Chrome")) { System.setProperty("webdriver.chrome.driver", "D:\\Dilu\\Java Projects\\SeleniumTest\\lib\\chromedriver\\chromedriver.exe"); driver=new ChromeDriver(); } Not sure why the code is running perfectly in eclipse(both Firefox and Chrome browsers are opening), and when it run through cmd prompt, it is showing error only for chrome browser (firefox opening without issues)
ok.. I deleted the entire jar file, and recreated it. Now I am able to run it from the command prompt (Firefox & Chrome) opening without issue. Thanks for all your help :)
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 us.....
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
Hi Karanam, the config file will be read as per the path given in the code, and hence it is reading the config file that we altered. So this also means if you want to take this jar to another system, you should also take the config file along. It is also recommended to provide a relative path to config file in the code, so no changes are required on a new system/location
Hi Rincy, you will have to package all the project with all dependencies in a runnable jar. I will not suggest this and a better option will be to create a maven project and you can also put it on cloud repo like GitHub, so you can pull and run it from any system. Can check this ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
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
Hi Darshan, so you can externalize all machine dependent variables. Like you can provide these from config files. I have a session in this series on config files. Moreover I would suggest to create a Mavenn project. You can find the videos here - automationstepbystep.com/909-2/online-courses/
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.
Hi Diksha, do you get any logs. You can also skip this and move to next. This session is to provide knowledge on jar creation, but is not related to next one
@@RaghavPal yes I do have logs . Actually i have created the complete framework but for creating runnable jar i am facing this issue. JAR is not able to read the classpath.
Hi Raghav, the test is not running in firefox from the command line, works fine with chrome. Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.get(String)" because "test.ModularProperpertyJar.driver" is null at test.ModularProperpertyJar.runTest(ModularProperpertyJar.java:63) at test.ModularProperpertyJar.main(ModularProperpertyJar.java:33) In eclipse both are working. Can you help me solve this?
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.
Hi Michael, Pls check this stackoverflow.com/questions/9689793/cant-execute-jar-file-no-main-manifest-attribute www.edureka.co/community/7007/unable-to-execute-jar-file-no-main-manifest-attribute
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?
Yes, we can Varsha, however I will suggest instead of creating a jar file, you can use a maven project. You can find a related videos in this playlist - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
Hi Raghav, When I am running my jar file through cmd it gave Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\Workspace\lib\chromedriver\chromedriver.exe
Hi Sandeep, JARs are good for small individual and stand alone modules. You should consider creating a maven project. Can see this - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
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 (C://users/......) in the Export destination box. Could you please explain it where I am wrong? Thanks.
Alok have you compiled your project before taking the jar. In case you are having major issues with your eclipse try getting a new eclipse. Watch this - Java Beginner Tutorial 4 - Getting Started with Eclipse IDE - ruclips.net/video/rpB1WWqZ6HQ/видео.html
Hi Roy, before creation of jar, you have to select the Main method containing class under RunConfiguration with wanted Name, then only you can see that given name under Launch configuration.
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
You have to create a new class file with main method, and within that write steps for calling TestNG XML, and then you have to create JAR file by selecting new class as an entry point.
Hi Rehan, will need more details and logs to troubleshoot. However I will suggest instead of jar, you can go with creating a maven project, Can find videos here - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
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 System.getProperty("user.dir"); 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.
Hi Walter, I believe properties file should be kept outside the jar so it is modifiable, that's the use of it. Check here - stackoverflow.com/questions/1507118/create-runnable-jar-with-properties-files-using-java-eclipse
Hi, although if you configure everything in jar file, you can do it, but will not be recommended. I will suggest you create a maven project for your framework. Can follow this - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
Hi Saurav, if you are using testng, I will suggest not to use this way, there are other ways to run from testng, and also commandline options are available in testng.
Jyothi, the src folder is present already in the framework as created in earlier sessions. In the video because i saved the jar file in the same location so you are seeing src folder. You can do the same save it in your project path.
hi Jyothi, JAR file fails to read config and properties file. Keeping the config file in the project root location with code changes and then create JAR file, whenever you are using this jar file outside the project folder or different system make sure you are shifting the jar along with config file. Or else jar file fails to find the config file.
Hi Raghav, I'm getting the following error whenever I try to execute the JAR file from the command line. Appreciate your inputs java -jar SeleniumTest.jar Firefox Firefox Exception in thread "main" org.openqa.selenium.WebDriverException: Build info: version: '4.0.0-alpha-5', revision: 'b3a0d621cc' System info: host: 'Ushas-MacBook-Air.local', ip: 'fe80:0:0:0:81d:513:f4be:916a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '14.0.1' Driver info: driver.version: FirefoxDriver at java.base/java.util.Optional.orElseThrow(Optional.java:401) at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:184) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:156) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:134) at test.FirstSeleniumTest.setBrowserConfig(FirstSeleniumTest.java:29) at test.FirstSeleniumTest.main(FirstSeleniumTest.java:18)
Hi Raghav, thanks for your response. Could you please walk me through how to find the 'Caused by' section. Currently i can only see the below errors in my terminal. seleniumProject usha2004$ java -jar SeleniumTest.jar Firefox Firefox Exception in thread "main" org.openqa.selenium.WebDriverException: Build info: version: '4.0.0-alpha-5', revision: 'b3a0d621cc' System info: host: 'Ushas-MacBook-Air.local', ip: 'fe80:0:0:0:81d:513:f4be:916a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '14.0.1' Driver info: driver.version: FirefoxDriver at java.base/java.util.Optional.orElseThrow(Optional.java:401) at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:184) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:156) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:134) at test.FirstSeleniumTest.setBrowserConfig(FirstSeleniumTest.java:29) at test.FirstSeleniumTest.main(FirstSeleniumTest.java:18) ---------------- seleniumProject usha2004$ java -jar SeleniumTest.jar Chrome Chrome Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from chromedriver.storage.googleapis.com/index.html at com.google.common.base.Preconditions.checkState(Preconditions.java:843) at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:142) at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:36) at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:195) at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:389) at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:118) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:105) at test.FirstSeleniumTest.setBrowserConfig(FirstSeleniumTest.java:32) at test.FirstSeleniumTest.main(FirstSeleniumTest.java:18)
I'm able to run the file on eclipse though, only with the JAR I have issues. Secondly, i set the system property using 'Run Configurations' in eclipse instead of setting it in the code like you had mentioned in your lesson. Can this cause the above error?
Okay for chrome looks like the issue is with driver path. You can try saving the browser drivers in a folder within the project and provide relative path in script. If you still face issues, you can skip and move to next video for now
@@RaghavPal Thanks a lot for the response Raghav, I follow ur video's from last year, I learned many automation techniques and implemented in my project too. Here I drop the logs of the error ""C:\Users\harish.LIQUID-UI0>cd D:\jar C:\Users\harish.LIQUID-UI0>java -jar Test.jar Error: Unable to access jarfile Test.jar "" (Request)-------> Now a days everyone uses Maven project compare to java project, Please make a video for" Jar file creation in Maven Project".
Is the jar file available in the location where your cmd is. Yes maven is what you should be doing Check here - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
U make everything look simple and easy to learn ..thanks Raghav
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.
Hi Abhi, i will do it soon.
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 "java.lang.IllegalStateException" driver executable doesnt exist error.
Note: Both the browsers opening perfectly when I run from eclipse.
Hi Dilsha, you will need to download and add chromedriver.exe
chromedriver.exe is already installed and kept in lib\chromedrive folder. and add using the code
if (browser.contains("Chrome"))
{
System.setProperty("webdriver.chrome.driver", "D:\\Dilu\\Java Projects\\SeleniumTest\\lib\\chromedriver\\chromedriver.exe");
driver=new ChromeDriver();
}
Not sure why the code is running perfectly in eclipse(both Firefox and Chrome browsers are opening), and when it run through cmd prompt, it is showing error only for chrome browser (firefox opening without issues)
Hi Dilsha, I believe in jar file chromedriver.exe is not getting added.
ok.. I deleted the entire jar file, and recreated it. Now I am able to run it from the command prompt (Firefox & Chrome) opening without issue. Thanks for all your help :)
Great to know this
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 us.....
Sure, i will soon plan to make complete project series on Selenium
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
Hi Karanam, the config file will be read as per the path given in the code, and hence it is reading the config file that we altered. So this also means if you want to take this jar to another system, you should also take the config file along. It is also recommended to provide a relative path to config file in the code, so no changes are required on a new system/location
You're very good at teaching.
Thanks a lot for the compliment
Really good content......I luv this channel
Great to know this Lucky
Nice and understandable video . How can we convert Cucumber BDD framwork to jar file and run from commandline
Hi Rincy, you will have to package all the project with all dependencies in a runnable jar. I will not suggest this and a better option will be to create a maven project and you can also put it on cloud repo like GitHub, so you can pull and run it from any system.
Can check this ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
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
Hi Darshan, so you can externalize all machine dependent variables. Like you can provide these from config files. I have a session in this series on config files. Moreover I would suggest to create a Mavenn project. You can find the videos here - automationstepbystep.com/909-2/online-courses/
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.
Hi Diksha, do you get any logs. You can also skip this and move to next. This session is to provide knowledge on jar creation, but is not related to next one
@@RaghavPal yes I do have logs . Actually i have created the complete framework but for creating runnable jar i am facing this issue. JAR is not able to read the classpath.
Okay, may be we can see logs. But if you have moved to next one its fine
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.
Hi Anoop, I had started a Gradle series, but yet to cover this scenario. For now pls try to get online help
Hi Raghav, the test is not running in firefox from the command line, works fine with chrome.
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.get(String)" because "test.ModularProperpertyJar.driver" is null
at test.ModularProperpertyJar.runTest(ModularProperpertyJar.java:63)
at test.ModularProperpertyJar.main(ModularProperpertyJar.java:33)
In eclipse both are working.
Can you help me solve this?
Hi Anshifa, not sure why its not working for Firefox. will need to check online.
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
Hi Adrián, when you run as testng, we do not need a main method, it will run as per your code and setup and testng annotations
Hi Raghav.....I am unable to select launch configuration while making a runnable jar file. how I will do this?
Hi Pratheep, this can help stackoverflow.com/questions/3224364/launch-configuration-shows-up-blank-when-trying-to-export-runnable-jar/3224505
@@RaghavPal I got it. it's working Raghav... Thanks a lot...
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.
Hi Michael, Pls check this
stackoverflow.com/questions/9689793/cant-execute-jar-file-no-main-manifest-attribute
www.edureka.co/community/7007/unable-to-execute-jar-file-no-main-manifest-attribute
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?
Hi Ria, Mostly you can get some info or logs. You can also make use of tools like jenkins to publish report after execution
Hi Raghav,
Can we make jar file from command prompt or without making use of a IDE? Is it possible?
Yes, we can Varsha, however I will suggest instead of creating a jar file, you can use a maven project. You can find a related videos in this playlist - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
@@RaghavPal Thank you
Hi Raghav, When I am running my jar file through cmd it gave
Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\Workspace\lib\chromedriver\chromedriver.exe
NOTE :- I did not save the jar in project itself ( When i saved it in the project itselt, Application is running)
Glad to know this Pratishtha. Keep learning.
how can we create a jar for the Framework build using pageobjectmodel Factory since I don't have any mail class
Hi Sandeep, JARs are good for small individual and stand alone modules. You should consider creating a maven project. Can see this - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
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 (C://users/......) in the Export destination box. Could you please explain it where I am wrong? Thanks.
Alok have you compiled your project before taking the jar. In case you are having major issues with your eclipse try getting a new eclipse. Watch this - Java Beginner Tutorial 4 - Getting Started with Eclipse IDE - ruclips.net/video/rpB1WWqZ6HQ/видео.html
Hi Roy, before creation of jar, you have to select the Main method containing class under RunConfiguration with wanted Name, then only you can see that given name under Launch configuration.
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
You have to create a new class file with main method, and within that write steps for calling TestNG XML, and then you have to create JAR file by selecting new class as an entry point.
Hi Ragav I have created jar file but when I run this jar it only create output folder but not running the script
Hi Rehan, will need more details and logs to troubleshoot. However I will suggest instead of jar, you can go with creating a maven project, Can find videos here - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
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 System.getProperty("user.dir"); 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.
Hi Ram, I will need to check and confirm with a hands-on
Hi I want to know if could be possible to include the properties file inside the runnable jar????
Hi Walter, I believe properties file should be kept outside the jar so it is modifiable, that's the use of it. Check here - stackoverflow.com/questions/1507118/create-runnable-jar-with-properties-files-using-java-eclipse
@@RaghavPal Thanks Raghav.
Is it possible to create testng report .....from java executable jar file ...thank u .
Hi, although if you configure everything in jar file, you can do it, but will not be recommended. I will suggest you create a maven project for your framework. Can follow this - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
Thank u sir
Most Welcome Chetan
suppose i'm using testng which has no main method, will it work then?
Hi Saurav, if you are using testng, I will suggest not to use this way, there are other ways to run from testng, and also commandline options are available in testng.
hii can u tell me how to create a jarfile for seleniumframework for specific method how to impliment that can u tell me detail
will do a session on that. You can also watch - ruclips.net/video/QB19Wqimkq4/видео.html
after creating a jar file iam not getting src,config file can u tell me in detailed way how to get that configured file
Jyothi, the src folder is present already in the framework as created in earlier sessions. In the video because i saved the jar file in the same location so you are seeing src folder. You can do the same save it in your project path.
hi Jyothi, JAR file fails to read config and properties file. Keeping the config file in the project root location with code changes and then create JAR file, whenever you are using this jar file outside the project folder or different system make sure you are shifting the jar along with config file. Or else jar file fails to find the config file.
How to run only specific tests not all tests using jar file?
Hi Harinat, for that you will need to use some Test Runner or tools like TestNG. I have not yet covered that. Will be doing soon.
Hi Raghav, I'm getting the following error whenever I try to execute the JAR file from the command line. Appreciate your inputs
java -jar SeleniumTest.jar
Firefox
Firefox
Exception in thread "main" org.openqa.selenium.WebDriverException: Build info: version: '4.0.0-alpha-5', revision: 'b3a0d621cc'
System info: host: 'Ushas-MacBook-Air.local', ip: 'fe80:0:0:0:81d:513:f4be:916a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '14.0.1'
Driver info: driver.version: FirefoxDriver
at java.base/java.util.Optional.orElseThrow(Optional.java:401)
at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:184)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:156)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:134)
at test.FirstSeleniumTest.setBrowserConfig(FirstSeleniumTest.java:29)
at test.FirstSeleniumTest.main(FirstSeleniumTest.java:18)
Hi Usha, the logs are not complete. Pls check you should find a Caused by section in the logs
Hi Raghav, thanks for your response. Could you please walk me through how to find the 'Caused by' section. Currently i can only see the below errors in my terminal.
seleniumProject usha2004$ java -jar SeleniumTest.jar
Firefox
Firefox
Exception in thread "main" org.openqa.selenium.WebDriverException: Build info: version: '4.0.0-alpha-5', revision: 'b3a0d621cc'
System info: host: 'Ushas-MacBook-Air.local', ip: 'fe80:0:0:0:81d:513:f4be:916a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '14.0.1'
Driver info: driver.version: FirefoxDriver
at java.base/java.util.Optional.orElseThrow(Optional.java:401)
at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:184)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:156)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:134)
at test.FirstSeleniumTest.setBrowserConfig(FirstSeleniumTest.java:29)
at test.FirstSeleniumTest.main(FirstSeleniumTest.java:18)
----------------
seleniumProject usha2004$ java -jar SeleniumTest.jar
Chrome
Chrome
Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:843)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:142)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:36)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:195)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:389)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:118)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:105)
at test.FirstSeleniumTest.setBrowserConfig(FirstSeleniumTest.java:32)
at test.FirstSeleniumTest.main(FirstSeleniumTest.java:18)
I'm able to run the file on eclipse though, only with the JAR I have issues. Secondly, i set the system property using 'Run Configurations' in eclipse instead of setting it in the code like you had mentioned in your lesson. Can this cause the above error?
Okay for chrome looks like the issue is with driver path. You can try saving the browser drivers in a folder within the project and provide relative path in script. If you still face issues, you can skip and move to next video for now
""Error: Unable to access jarfile Test.jar"" i m facing this error ,please give me a suggestion to fix this brother
Hi Harish, will need more details. Where exactly you got this error. Do you have any logs?
@@RaghavPal
Thanks a lot for the response Raghav, I follow ur video's from last year, I learned many automation techniques and implemented in my project too.
Here I drop the logs of the error
""C:\Users\harish.LIQUID-UI0>cd D:\jar
C:\Users\harish.LIQUID-UI0>java -jar Test.jar
Error: Unable to access jarfile Test.jar ""
(Request)-------> Now a days everyone uses Maven project compare to java project, Please make a video for" Jar file creation in Maven Project".
Is the jar file available in the location where your cmd is.
Yes maven is what you should be doing
Check here - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
When I run code in other system it show fail,But in my system it’s working
Hi Sanu, will do so, Let me know the error message you are getting
It show failure in other system but in my system it show successful.can you provide any this kind ofvideo
I will need to see some logs for this