Hi @Raghav , so what is the basic difference between webdriver and webdriverManager? I mean to say how webdriverManager handles all the browsers so that we don't need the .exe files.
Hi Sudhir Webdriver is a selenium library. An interface in selenium to be more specific. Webdriver Manager is a separate library recently created to handle browser management
Hi Manish Yes, WebDriver Manager is used in real-time software projects. It is a popular tool for managing Selenium WebDriver binaries. It allows you to download and manage the latest versions of WebDriver binaries for different browsers. This can save you a lot of time and effort, as you do not have to download and install the binaries manually. However, there have been some reports that launching browsers using WebDriver Manager can be slow. This is because WebDriver Manager has to download the binaries from the internet. If you are experiencing slowness when launching browsers using WebDriver Manager, there are a few things you can try: *Use a local cache* WebDriver Manager allows you to cache the binaries locally. This can speed up the browser launch time, as the binaries do not have to be downloaded from the internet every time you launch a browser *Use a proxy server* If you are behind a proxy server, you can configure WebDriver Manager to use the proxy server. This can also speed up the browser launch time, as the binaries do not have to be downloaded from the internet directly *Use a different WebDriver manager* There are other WebDriver managers available, such as GeckoDriverManager and ChromeDriverManager. These managers may be faster than WebDriver Manager. I hope this helps
@@RaghavPal Hi Raghav, I am fan your Postman Tutorial . Right now looking for JDBC.. Please make it as next video. Try to cover how we use it in Automation testing. Thanks for your effort and help.
Hi Raghav, I tried to Add dependency but getting error in console as "Failed to read artifact descriptor for io.github.bonigarcia:webdrivermanager:jar:3.8.1 " can you help me with this issue.
Hi Savita, can you try to run command mvn -U clean install Also read this - stackoverflow.com/questions/6642146/maven-failed-to-read-artifact-descriptor
Okay, this will explain examples.javacodegeeks.com/solving-slf4j-failed-load-class-org-slf4j-impl-staticloggerbinder/ stackoverflow.com/questions/7421612/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder
Hi Raghav,I passed out in 2015 and now I completed my testing(selenium) course...now can I enter into the field of automation after this much gap?Please suggest me....
Hi Sirisha, yes you can get into automation testing job. You can start applying.Along with selenium you can add the following skills - VCS tool like git - CI tool like Jenkins - API testing tool(s)
If you could create a end to end framework development or create a complete end to end framework then that could be a great help.. please please do create one
Once you get some basics, you can start with Selenium Automation. If anything required, you can learn during the process. Do not wait to be very good in Java before starting Selenium, You can check some basic java here - automationstepbystep.com/online-courses/
Hi Raghav, your explanation is being very clear but sometimes I am not able to get the output as you show. In this web driver manager, even after dependency, I am facing the same error as you shown before. Pls help me to solve this
Hello Raghav, Honestly speaking i am a big fan of tutoring the way you start from scratch its amazing. i have one quick question i tried the above video to create a webdriver manager in maven project but after completing the dependencies steps i dont see any maven dependencies folder on left hand side why is it so? can you please let me know
Hi Alexey, Looks like one of the following jar is not available in the project slf4j-log4j12.jar (for log4j logging), slf4j-jdk14.jar (for Java logging), slf4j-jcl.jar a very good explanation given here examples.javacodegeeks.com/enterprise-java/slf4j/solving-failed-load-class-org-slf4j-impl-staticloggerbinder-error/ stackoverflow.com/questions/7421612/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder
Hi Saurabh, here if you are using Jenkins on the same system as your project and jenkins has access to the project folder and required libraries, then it must run fine, Else you will need to check the logs and troubleshoot
@@RaghavPal Thanks for the reply. Actually Webdriver was not executin in Jenkins, but I figured it out. We have to put the jmx file and chromedriver in Jenkins workspace folder created for building job, only then the Jmeter-webdriver ran successfully. But i am facing one more issue in log file as error webdriversampler: unknown error: net::err_name_not_resolved, while running it from Jenkins. Script is placed as Windows slave (remote desktop) connected to Jenkins which is installed on linux server. It would be great if you create one video for this execution through Jenkins.
Hi Mounir, if you have done for Java, you do not need anything diff for TestNG, if you have functions with testng annotations, the java code will be the same
Hi Raghav I did it with Java and try it with TESTNG Annotations @BrforeClass and @AfterClass and got some errors and found the solution when make some researches thank you again
Hi Vishwambhar, Are you also using groups. Here is some info - stackoverflow.com/questions/5020260/testng-beforemethod-method-not-called-when-it-resides-in-superclass-and-a-speci github.com/cbeust/testng/issues/92
i am confused! with one of the video, we are using system.setproperty to setup to use chromedriver.exe. now this video we are using webdrivermanager. will this the new way and is it from selenium 4 on, since i have selenium - java in my maven project and it was version 4.10.0.
Hi The earlier video was created before Webdriver Manager was introduced. Later on I added this video as WDM makes it very easy to manage browser without having to manually download and setup browser exe
Hi Raghav! I am going through the series. very well explained. While running the code, I am getting this error. Are there any settings I should be aware of that need to be changed? Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5. Exception in thread "main" io.github.bonigarcia.wdm.WebDriverManagerException: org.apache.http.conn.HttpHostConnectException: Connect to npm.taobao.org:80 [npm.taobao.org/114.55.80.225] failed: Connection timed out: connect
hii raghav..i like your way of teaching.i am new in selenium.but i face this problem..Exception in thread "main" java.lang.Error: Unresolved compilation problems: WebDriver cannot be resolved to a type FirefoxDriver cannot be resolved to a type how to solve it??Thanks in advance
Hi, i am using iedriver to run a webautomation using python and robotframework.. I have webdrivermanager python package as well in my installed oython packages. Will it conflict with iedriver? Trying to investigate an issue where my tests fail at times with [object error] message
Hi Dhanya, I can understand, this video was added later to show the option of using Webdriver Manager to manage browser drivers. You can either skip this or you can check this playlist - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
Hi sir , I am following your video and practicing also but after click on the finish button. It showing the error as "failed to create the project and also showing could not calculate the build plan ".can you please help me with this
Hi Amrutha, this seems like issue with Maven, Pls check this stackoverflow.com/questions/12533885/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-resources stackoverflow.com/questions/21909466/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-jar-plugin?lq=1
Hi Raghav, This is working fine when I am using Maven Project but for the Java project, while I am adding the jar file in the build path, this doesn't work. In that case, it is throwing the below error. Would appreciate if you can help me out. ----------------------------------------------------------------------------------------------------------------------- Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ClassicHttpRequest at LearningWebDriverManager.main(LearningWebDriverManager.java:11) Caused by: java.lang.ClassNotFoundException: org.apache.hc.core5.http.ClassicHttpRequest at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
I can't get it to work. It worked fine with the previous method using the System.setProperty method, but when I try to use WebDriverManager it won't start. I'm using Chrome, and when I run the application, it waits for a while (5-10 seconds maybe) and then throws a long error message: *Exception in thread "main" io.github.bonigarcia.wdm.WebDriverManagerException: java.net.UnknownHostException* Do you know what might be happening? EDIT: It won't work on Internet Explorer either, although the error message is different: *Exception in thread "main" io.github.bonigarcia.wdm.WebDriverManagerException: java.net.UnknownHostException: **selenium-release.storage.googleapis.com*
I have installed webdriver manager. It worked successfully in chrome. When I tried in Firefox it gives an error: Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'LE1481', ip: '2409:4073:2e9b:f0e8:ac59:77e2:bed4:c298', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_121' Driver info: driver.version: FirefoxDriver What is this issue ?
@@RaghavPal Sir if i do so then all test cases will depends on each other. I mean if any test case fail in between the test then how the next test will start? Sir can you suggest me please or give any demo
@@RaghavPal Got you sir. One last question, running a large number of test cases may be 100 or more in one browser will cause any kind of memory issue, hange or cache problem?
Yes, it depends on the configuration of the system, Usually we use separate server machines with required configuration or cloud service providers like Browserstack, Saucelabs for this
Hi Raghav, created a normal Java project and added WebDriverManager.jar file into my build path, instead of creating a maven dependency. But while running the test i'm getting, "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ClassicHttpRequest". Could you please explain.
Hi Raghav, I downloaded the webdriver manager jar file. I added this jar file to build path as well(in the same way as we do while adding selenium jar file). Then i wrote code acc to the video but I am getting "java.lang.ClassNotFoundException"
@@RaghavPal I did exactly what is mentioned in the video. If you notice, there are some comments below where people are facing same issue which I am facing. I am pasting the error which i am getting and also, I am pasting my code. Error:- "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ClassicHttpRequest at package1.WebDrivermanagerDemo.main(WebDrivermanagerDemo.java:11) Caused by: java.lang.ClassNotFoundException: org.apache.hc.core5.http.ClassicHttpRequest at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 1 more" Code:- package package1; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import io.github.bonigarcia.wdm.WebDriverManager; public class WebDrivermanagerDemo { public static void main(String[] args) { WebDriverManager.chromedriver().setup(); WebDriver driver = new ChromeDriver(); driver.get("www.google.com"); } }
Okay, I will check on this, Meanwhile also see if any of the earlier comments have any solution. In case you find something, pls post it here for helping others. If I find will update here
Yes Dinesh, so you can skip this and you do not have to download the browser exe file and do not have to provide the location in this statement. All this will be taken care by WebDriverManager
Hi Raghav, I am getting error message "org/apache/http/client/methods/HttpRequestBase " when I am trying to use webdriver manager for a non maven project. I have already installed & configured build path for selenium java & webdriver manager jar files
@@RaghavPal: Yes, I have checked the steps again and still getting an error when I am trying to set up a web driver manager for the non-maven project. Is there any video/reference available for the same.
Hi Raghav...in linux machine, dependencies are not getting download when mvn clean install or mvn -u is done. Says downloading and gives timeout. Please help
Raghav: I gave the below lines in settings.xml file $ export http_proxy="USER:PASSWORD@PROXY_SERVER:PORT" $ export https_proxy="USER:PASSWORD@PROXY_SERVER:PORT" $ export ftp_proxy="USER:PASSWORD@PROXY_SERVER:PORT
Hey sir! Thanks for your magic video. I have learnt alot from your magic videos. I'm facing one problem that is whenever i start my browser then in the console i got this error again and again "[1589218862.811][SEVERE]: Timed out receiving message from renderer: 0.100". I'm using WebDriverManger chrome to start the browser. Can you help me out. I tried to fix this but not able to get rid of this. Can you please help me. Thank you sir! I hope i'll get your reply soon.
Hi Rajesh, Pls try to get a version on chromedriver as per the Chrome ver on your system. Check this stackoverflow.com/questions/48450594/selenium-timed-out-receiving-message-from-renderer github.com/bonigarcia/webdrivermanager/issues/442
Hi @ Raghav i followed your code and try to run i got below error could you please check and provide solution for this. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpRequestBase at SeleniumTest.LoginTest.main(LoginTest.java:18) Caused by: java.lang.ClassNotFoundException: org.apache.http.client.methods.HttpRequestBase at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 1 more
Hi Kalyan, as per the error msg, there are some jars missing, Is this a maven project. Usually maven will take care of this, else you will have to add missing jars manually
Hi Al Zaminur Rahman, hope you are using a maven project. Have you added the required dependency in pom.xml. You can save and rebuild your project after adding and try again.
@@RaghavPal Some maven dependencies are not being added when I save & clean the project. I have added the following code in POM.xml and the problem is resolved.
spring-milestones Spring Milestones repo.spring.io/libs-milestone
Hi Raghav, I recently started to follow your videos, they are excellent and clear to understand. I have a small doubt there is an error when running the sample code. I add maven but I can't find the problem. >> The error I got (java: package io.github.bonigarcia.wdm does not exist) >> Below is my main class import io.github.bonigarcia.wdm.WebDriverManager; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class SelTest { public static void main(String[] args) { WebDriverManager.chromedriver().setup(); WebDriver driver = new ChromeDriver(); driver.get("selenium.dev/"); } } >> And got blow errors as well ...................................................................... java: source value 1.5 is obsolete and will be removed in a future release java: target value 1.5 is obsolete and will be removed in a future release java: To suppress warnings about obsolete options, use -Xlint:-options. java: Errors occurred while compiling module 'SeleniumWedDriver' Checking dependencies... [SeleniumWedDriver] Dependency analysis found 0 affected files javac 1.8.0_25 was used to compile java sources Finished, saving caches... Module "SeleniumWedDriver" was fully rebuilt due to project configuration/dependencies changes Compilation failed: errors: 6; warnings: 3 Executing post-compile tasks... Synchronizing output directories... 21/10/2020 23:51 - Build completed with 6 errors and 3 warnings in 2 s 697 ms
Hi for the issue that java 1.5 is obsolete, you can add the maven-compiler-plugin source and target in pom.xml This will help - mkyong.com/maven/maven-source-value-1-5-is-obsolete-and-will-be-removed-in-a-future-release/ After this add the dependency for webdriver manager again and re-build project and check again github.com/bonigarcia/webdrivermanager/issues/251
Hi Raghav, I am facing the below issue upon trying to execute a very simple program.I saw your video on Selenium WebManagerDriver and was trying a demo. Project is a simple Java Project and I have added the jars webdrivermanger4.1.0 ,selenium-java-3.149.59 in the configure build path. This is my code: package brainboosters; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import io.github.bonigarcia.wdm.WebDriverManager; public class Webdrivermanager { public static void main(String[] args) { // TODO Auto-generated method stub WebDriverManager.chromedriver().setup(); WebDriver driver=new ChromeDriver(); driver.get("www.google.com"); driver.quit(); } } Getting the error Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ClassicHttpRequest at brainboosters.Webdrivermanager.main(Webdrivermanager.java:13) Caused by: java.lang.ClassNotFoundException: org.apache.hc.core5.http.ClassicHttpRequest at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 1 more Tried adding httpcore.jar in configure build path.It did not workout.
Hi Rohit, I will take and work on this feedback, I believe if you watch from video 1 of this series, it should be simple, but still I will try to go more basic with every video. You can check full playlist here - automationstepbystep.com/
After installing the Java dependencies, am getting the below error as: 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.seleniumhq.selenium:selenium-java:jar -> version 3.141.5 vs 3.141.59
i am getting this error - java: cannot find symbol symbol: method chromedriver() location: class io.github.bonigarcia.wdm.WebDriverManager idont where i am going wrong?
Sowjanya The error "No SLF4J providers were found" means that Selenium cannot find a logging framework to use. There are many different logging frameworks available, and Selenium does not come with a default one. To fix this error, you need to add a logging framework to your project. There are many different ways to do this, but one common way is to use the SLF4J library. To add SLF4J to your project, you need to add the following dependency to your pom.xml file: ``` org.slf4j slf4j-api 1.7.30 ``` You also need to add a logging implementation to your project. A popular logging implementation is Logback. To add Logback to your project, you need to add the following dependency to your pom.xml file: ``` ch.qos.logback logback-classic 1.2.3 ``` Once you have added the SLF4J and Logback dependencies to your project, you need to configure Logback. You can do this by creating a logback.xml file in the src/main/resources directory of your project. The following is an example of a logback.xml file: ```
``` This configuration will send all log messages to the console. Once you have configured Logback, you should be able to run your Selenium tests without getting the error "No SLF4J providers were found". The error "its not opening google in chrome" could be caused by a few things. One possibility is that you are not running the Chromedriver executable. Chromedriver is a program that allows Selenium to control Chrome. You can download Chromedriver from the Chromedriver website. Another possibility is that you are not passing the correct browser arguments to Selenium. To open Google in Chrome, you need to pass the following browser arguments to Selenium: ``` --start-maximized --disable-infobars ``` The --start-maximized argument will start Chrome in maximized mode, and the --disable-infobars argument will disable the infobars that appear at the top of the Chrome window. You can pass browser arguments to Selenium by using the WebDriver.chromeOptions() method. For example: ``` WebDriver driver = new ChromeDriver(options); ``` where options is a ChromeOptions object that contains the browser arguments.
@@RaghavPal Thanks for the reply, I have only added slf4j, slf4j-simple and now its Exception in thread "main" java.util.NoSuchElementException: No value present What should I do about it? all the logbacks and options is a little too much for me now, any thing simple please. For now I am using the old set property instead of web driver manager
Like the fact that Raghav always starts from scratch. Seeing the process over and over makes it easier over time. Great video!
Thanks J L
from last two days i was sufering problem in maven but in few minute i have resolved the with the hep of your vedio problem lot of thanks sir
You are most welcome Rajesh
Raghav, Thanks for this fantastic video. I am now clear about why Maven is used in Selenium projects.
Glad it was helpful Megan
Thank you very much, this is the very course I am desperately looking for. Million thanks.
you're welcome Rose.
Waaw I have 5+ years of experience in selenium and I learned it now
Glad to know this Mayank.
Raghav is it official to use I mean can suggest it to my client to use
Wow, it solves a huge problem. thanks, Raghav Pal
Most welcome Mohsin
Hey, Raghav! Thanks for your tutorials! You are Awesome!!!!!!
Most welcome
Great Explanation ..Very Easy to Understand ...Thank you so much!!!!! we Request you to make [[[ Special VIDEO on SHORT CUTS in AUTOMATION ]]]]]
Sure Chiluka
Thank you so much!! Great explanation sir..
Most welcome Sunita
Hi @Raghav , so what is the basic difference between webdriver and webdriverManager?
I mean to say how webdriverManager handles all the browsers so that we don't need the .exe files.
Hi Sudhir
Webdriver is a selenium library. An interface in selenium to be more specific. Webdriver Manager is a separate library recently created to handle browser management
Thank you so much sir, its working 👍👍
Most welcome
The best ever!
Thanks a lot
Very well explained, Subscribed. Thank you..
Awesome, thank you!
Sir, Do you have any video for continuous testing using Microsoft azure? Adding selenium tests to pipeline and define tasks in order to run.
Not yet Shalini
On using WebDriver Manager, launching browser is very slow.. IDK whether it is used in real time software projects, your comment @raghav?
Hi Manish
Yes, WebDriver Manager is used in real-time software projects. It is a popular tool for managing Selenium WebDriver binaries. It allows you to download and manage the latest versions of WebDriver binaries for different browsers. This can save you a lot of time and effort, as you do not have to download and install the binaries manually.
However, there have been some reports that launching browsers using WebDriver Manager can be slow. This is because WebDriver Manager has to download the binaries from the internet. If you are experiencing slowness when launching browsers using WebDriver Manager, there are a few things you can try:
*Use a local cache* WebDriver Manager allows you to cache the binaries locally. This can speed up the browser launch time, as the binaries do not have to be downloaded from the internet every time you launch a browser
*Use a proxy server* If you are behind a proxy server, you can configure WebDriver Manager to use the proxy server. This can also speed up the browser launch time, as the binaries do not have to be downloaded from the internet directly
*Use a different WebDriver manager* There are other WebDriver managers available, such as GeckoDriverManager and ChromeDriverManager. These managers may be faster than WebDriver Manager.
I hope this helps
Sir your explanation is amazing, I always looking your new video any testing related . I would like to request you please make some video JDBC.
Sure Md Ashraf. I will do that
@@RaghavPal Hi Raghav, I am fan your Postman Tutorial . Right now looking for JDBC.. Please make it as next video. Try to cover how we use it in Automation testing. Thanks for your effort and help.
Sure Ravi, Thanks for watching.
thank you! it was extremely useful
Most welcome
Hi Raghav, I tried to Add dependency but getting error in console as "Failed to read artifact descriptor for io.github.bonigarcia:webdrivermanager:jar:3.8.1
" can you help me with this issue.
Hi Savita,
can you try to run command mvn -U clean install
Also read this - stackoverflow.com/questions/6642146/maven-failed-to-read-artifact-descriptor
Thank you for video sir ji , but what that first line error in consol staticloggerbinder
Okay, this will explain examples.javacodegeeks.com/solving-slf4j-failed-load-class-org-slf4j-impl-staticloggerbinder/
stackoverflow.com/questions/7421612/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder
Excellent thanks 👍
Hi Raghav,I passed out in 2015 and now I completed my testing(selenium) course...now can I enter into the field of automation after this much gap?Please suggest me....
Hi Sirisha, yes you can get into automation testing job. You can start applying.Along with selenium you can add the following skills
- VCS tool like git
- CI tool like Jenkins
- API testing tool(s)
Hi Raghav. Thank you for great info. Just a small correction. At 9:50 the "version" method is now changed to "browserVersion" Thank you.
Thanks for the info Satish
If you could create a end to end framework development or create a complete end to end framework then that could be a great help.. please please do create one
Hi, its already available here. Pls check - automationstepbystep.com/
Thanks a lot Raghav Sir...
You're welcome Chanusha
Hey raghav
can you guide me that how much java is required for selenium webdriver? Your reply is very helpful for me.
Hi Nida, if you can learn basics of java and Object Oriented concepts, It should be enough to get started with Selenium Java
@@RaghavPal thanks for response.
Can you highlight the topics of java for selenium ? as i am new in selenium webdriver.
After basics of java it is necessary to do advanced java for selenium? Please guide me or is it enough to do java basics for selenium?
Once you get some basics, you can start with Selenium Automation. If anything required, you can learn during the process. Do not wait to be very good in Java before starting Selenium, You can check some basic java here - automationstepbystep.com/online-courses/
@@RaghavPal thanks for the guidence. I learn alot from your tutorials.
Hi Raghav, your explanation is being very clear but sometimes I am not able to get the output as you show. In this web driver manager, even after dependency, I am facing the same error as you shown before. Pls help me to solve this
Hi Abirami, pls tell me what is the error with details and logs.
Hello Raghav,
Honestly speaking i am a big fan of tutoring the way you start from scratch its amazing. i have one quick question i tried the above video to create a webdriver manager in maven project but after completing the dependencies steps i dont see any maven dependencies folder on left hand side why is it so? can you please let me know
Hi Salim, Thanks for your message. Pls see if this helps - stackoverflow.com/questions/4262186/missing-maven-dependencies-in-eclipse-project
Helpful ☺
Glad it helped Shahzaib
Hello Raghav, Do I need to have this webDriver manager installed even when i have manually installed ChromeDriver.exe
Hi Quincy, if you manually add location for chromedriver in the code, then you will not need webdriver manager
Is there an equivalent package I can use in Node for this? The "webdriver-manager" npm package doesn't seem to do the same thing...?
will need to check
Hey, Raghav! Thanks for your tutorials! Why we have this error message in console: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
Hi Alexey, Looks like one of the following jar is not available in the project
slf4j-log4j12.jar (for log4j logging),
slf4j-jdk14.jar (for Java logging),
slf4j-jcl.jar
a very good explanation given here
examples.javacodegeeks.com/enterprise-java/slf4j/solving-failed-load-class-org-slf4j-impl-staticloggerbinder-error/
stackoverflow.com/questions/7421612/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder
Hi Raghav, how we use this in Jmeter Webdriver Sampler? Jenkins is not executed the Jmeter webdriver sampler
Hi Saurabh, here if you are using Jenkins on the same system as your project and jenkins has access to the project folder and required libraries, then it must run fine, Else you will need to check the logs and troubleshoot
@@RaghavPal Thanks for the reply. Actually Webdriver was not executin in Jenkins, but I figured it out. We have to put the jmx file and chromedriver in Jenkins workspace folder created for building job, only then the Jmeter-webdriver ran successfully. But i am facing one more issue in log file as error webdriversampler: unknown error: net::err_name_not_resolved, while running it from Jenkins. Script is placed as Windows slave (remote desktop) connected to Jenkins which is installed on linux server.
It would be great if you create one video for this execution through Jenkins.
Thanks for adding Saurabh, I will check on this
Hi raghav , can u please do some videos on core java and selenium and framework interview questions
Hi Sandeep, I will do, I have a basic Java course, You can check all here - automationstepbystep.com/online-courses/
Hi Raghav, thank you very much
and please I did it on Java but how can we do it with TESTNG ?
Hi Mounir, if you have done for Java, you do not need anything diff for TestNG, if you have functions with testng annotations, the java code will be the same
Hi Raghav I did it with Java and try it with TESTNG Annotations @BrforeClass and @AfterClass and got some errors and found the solution when make some researches thank you again
Hi Raghav,
why does testNG BeforeMethod annotation does not work from super class though we set to alwaysRun=true, any idea?
Hi Vishwambhar, Are you also using groups. Here is some info - stackoverflow.com/questions/5020260/testng-beforemethod-method-not-called-when-it-resides-in-superclass-and-a-speci
github.com/cbeust/testng/issues/92
i am confused! with one of the video, we are using system.setproperty to setup to use chromedriver.exe. now this video we are using webdrivermanager. will this the new way and is it from selenium 4 on, since i have selenium - java in my maven project and it was version 4.10.0.
Hi
The earlier video was created before Webdriver Manager was introduced. Later on I added this video as WDM makes it very easy to manage browser without having to manually download and setup browser exe
Thank you bro.
Always welcome
Hi Raghav! I am going through the series. very well explained.
While running the code, I am getting this error. Are there any settings I should be aware of that need to be changed?
Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Exception in thread "main" io.github.bonigarcia.wdm.WebDriverManagerException: org.apache.http.conn.HttpHostConnectException: Connect to npm.taobao.org:80 [npm.taobao.org/114.55.80.225] failed: Connection timed out: connect
Hi Supriya, Pls see if this helps github.com/julienvollering/MIAmaxent/issues/1
Can you pls tell us how to use webdriver manager in ubuntu Linux machine in headless
I will plan sessions on this
Hi Raghav, cloud you please let us know how to download your notes.
I just add the notes in the description section, you can view or copy
@@RaghavPal Thanks
hii raghav..i like your way of teaching.i am new in selenium.but i face this problem..Exception in thread "main" java.lang.Error: Unresolved compilation problems:
WebDriver cannot be resolved to a type
FirefoxDriver cannot be resolved to a type
how to solve it??Thanks in advance
Hi Amandeep, ensure if the libraries are added properly in the project
@@RaghavPal it's working...I added the drivers.. thanks alot
Hi, i am using iedriver to run a webautomation using python and robotframework.. I have webdrivermanager python package as well in my installed oython packages. Will it conflict with iedriver? Trying to investigate an issue where my tests fail at times with [object error] message
Hi Rosh, No, you can keep all the libraries and in the code, use what you need
Hello Raghav main jo apki Video se samjha ho WebDriver manager karne k bad Selenium ka ChromeDriver update ki need nahi hai kindly explain
Yes, you do not need to download and use chromedriver manaully, WebDriver Manager will take care of it
@@RaghavPal Raghav i am Autohotkey User i want to use Webdriver Manager with my Programing Langue do have any idea use for it...
not much, will need to check online
Hi Sir,
I'm confused btw Maven depency , selenium jars ... I'm just following wat is describing in the vedio. Can you pls give me clarity on this ?
Hi Dhanya, I can understand, this video was added later to show the option of using Webdriver Manager to manage browser drivers. You can either skip this or you can check this playlist - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
Since Selenium 4.6 we can use selenium-manager directly
Thanks for adding this
@@RaghavPal welcome
Hi sir , I am following your video and practicing also but after click on the finish button. It showing the error as "failed to create the project and also showing could not calculate the build plan ".can you please help me with this
Hi Amrutha, this seems like issue with Maven, Pls check this
stackoverflow.com/questions/12533885/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-resources
stackoverflow.com/questions/21909466/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-jar-plugin?lq=1
@Raghav, i do not see maven dependencies folder after clean and build
Hi Sri, check this stackoverflow.com/questions/4262186/missing-maven-dependencies-in-eclipse-project
Hi Raghav, This is working fine when I am using Maven Project but for the Java project, while I am adding the jar file in the build path, this doesn't work. In that case, it is throwing the below error. Would appreciate if you can help me out.
-----------------------------------------------------------------------------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ClassicHttpRequest
at LearningWebDriverManager.main(LearningWebDriverManager.java:11)
Caused by: java.lang.ClassNotFoundException: org.apache.hc.core5.http.ClassicHttpRequest
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
Hi Ashish, I will suggest that you continue with maven project. Using jar will be tricky and not stable in long run
I can't get it to work. It worked fine with the previous method using the System.setProperty method, but when I try to use WebDriverManager it won't start. I'm using Chrome, and when I run the application, it waits for a while (5-10 seconds maybe) and then throws a long error message:
*Exception in thread "main" io.github.bonigarcia.wdm.WebDriverManagerException: java.net.UnknownHostException*
Do you know what might be happening?
EDIT: It won't work on Internet Explorer either, although the error message is different: *Exception in thread "main" io.github.bonigarcia.wdm.WebDriverManagerException: java.net.UnknownHostException: **selenium-release.storage.googleapis.com*
Hi Maximus, pls show me your code where you are using webdriver manager. Also check this can help - github.com/bonigarcia/webdrivermanager/issues/305
I have installed webdriver manager. It worked successfully in chrome. When I tried in Firefox it gives an error: Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'LE1481', ip: '2409:4073:2e9b:f0e8:ac59:77e2:bed4:c298', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_121'
Driver info: driver.version: FirefoxDriver
What is this issue ?
Hi Shaji, you can try with some specific ver and check
Hi @ Raghav while adding pom.xml i am getting error like
Multiple annotations found how to find that error
Hi Kalyan, check this - stackoverflow.com/questions/6021899/eclipse-maven-multiple-annotations-found-at-this-line
Sir, is it good practice to open a new browser for every test case. I mean what is the best approach? Please tell me. Thanks!
You can open browser once and close at the end of testing.
@@RaghavPal Sir if i do so then all test cases will depends on each other. I mean if any test case fail in between the test then how the next test will start? Sir can you suggest me please or give any demo
You can do error and exception handling so that the execution does not stop
@@RaghavPal Got you sir. One last question, running a large number of test cases may be 100 or more in one browser will cause any kind of memory issue, hange or cache problem?
Yes, it depends on the configuration of the system, Usually we use separate server machines with required configuration or cloud service providers like Browserstack, Saucelabs for this
Awesome!!!! thank you!!!!
You're welcome Meytal
Hi Raghav, created a normal Java project and added WebDriverManager.jar file into my build path, instead of creating a maven dependency. But while running the test i'm getting, "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ClassicHttpRequest". Could you please explain.
Hi Vishnu, will need to check more details. Do you see a Caused By section in the logs.
@vishnu, even i am getting same issue. I also downloaded the jar file
@vishnu, if your problem has got solved then please reply with the solution
can we use the webdriver manager in cucumber also?
Yes, we can Sagar
Hi Raghav,
I downloaded the webdriver manager jar file. I added this jar file to build path as well(in the same way as we do while adding selenium jar file). Then i wrote code acc to the video but I am getting "java.lang.ClassNotFoundException"
Hi Deshant, check if the library is imported properly in the class, Try to do the steps again
@@RaghavPal I did exactly what is mentioned in the video. If you notice, there are some comments below where people are facing same issue which I am facing.
I am pasting the error which i am getting and also, I am pasting my code.
Error:-
"Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ClassicHttpRequest
at package1.WebDrivermanagerDemo.main(WebDrivermanagerDemo.java:11)
Caused by: java.lang.ClassNotFoundException: org.apache.hc.core5.http.ClassicHttpRequest
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more"
Code:-
package package1;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import io.github.bonigarcia.wdm.WebDriverManager;
public class WebDrivermanagerDemo {
public static void main(String[] args) {
WebDriverManager.chromedriver().setup();
WebDriver driver = new ChromeDriver();
driver.get("www.google.com");
}
}
Okay, I will check on this, Meanwhile also see if any of the earlier comments have any solution. In case you find something, pls post it here for helping others. If I find will update here
@@RaghavPal sure Raghav. I could not find the solution in the comments. I tried to find solutions on the web but could not get any
I will too need to check online on this Deshant, will let you know if I find something
thankyou ❤❤
Most welcome
Hi one more problem in program that is webelement can't be resolved
And select Can't be resolved how to solve this issue
Hi Asma, I will need to check on this, Also check online
thanks alot..
Most welcome!
don't we need to download chromdrvier or geckodriver if we use manager?
No, Webdriver Manager will manage this, will get the latest ver, In case you need to use a specific ver, can give the ver no too
Is this web driver manager open source? Is it possible to use this web driver free for production
Hi Adharv, yes, you can use it, can check more here - github.com/bonigarcia/webdrivermanager
Hi ragav successful test case but it only run on Chrome driver only it can't work on Firefox gecko r ie
Hi Asma, can check the documentation here github.com/bonigarcia/webdrivermanager
Can also try to change ver of firefox
How to do D's explain clearly plse
I will plan a session
Still not clear what is the use of WebManager ? Is it that it will skip adding code system.setproperty...........????
Yes Dinesh, so you can skip this and you do not have to download the browser exe file and do not have to provide the location in this statement. All this will be taken care by WebDriverManager
Hi Raghav, I am getting error message "org/apache/http/client/methods/HttpRequestBase " when I am trying to use webdriver manager for a non maven project. I have already installed & configured build path for selenium java & webdriver manager jar files
Hi Rahul, will need more details and logs to troubleshoot. Hope you have rechecked all the steps
@@RaghavPal: Yes, I have checked the steps again and still getting an error when I am trying to set up a web driver manager for the non-maven project. Is there any video/reference available for the same.
not yet, will have to take online help Rahul
Hi Raghav, May I know the difference b/w webDriverManager.chromeDriver().setup(); webDriverManager.chromeDriver.create();
Hi Ayyappa, can check here bonigarcia.dev/webdrivermanager/
i tried writing a very simple program using this method in eclipse and there is some error coming please tell me how to share a screenshot
Hi Alefiya, you can email me raghav.qna@gmail.com
Hi Raghav...in linux machine, dependencies are not getting download when mvn clean install or mvn -u is done. Says downloading and gives timeout. Please help
Hi Shalini, can be network issue, Pls check if the machine has opened ports to get data from network
@@RaghavPal
Issue got solved. Gave proxy details in maven settings.xml file
Great to know this Shalini, If you have some data or links to show can help others
Raghav: I gave the below lines in settings.xml file
$ export http_proxy="USER:PASSWORD@PROXY_SERVER:PORT"
$ export https_proxy="USER:PASSWORD@PROXY_SERVER:PORT"
$ export ftp_proxy="USER:PASSWORD@PROXY_SERVER:PORT
Thanks for adding Shalini
Hey sir! Thanks for your magic video. I have learnt alot from your magic videos. I'm facing one problem that is whenever i start my browser then in the console i got this error again and again "[1589218862.811][SEVERE]: Timed out receiving message from renderer: 0.100". I'm using WebDriverManger chrome to start the browser. Can you help me out. I tried to fix this but not able to get rid of this. Can you please help me. Thank you sir! I hope i'll get your reply soon.
Hi Rajesh, Pls try to get a version on chromedriver as per the Chrome ver on your system. Check this
stackoverflow.com/questions/48450594/selenium-timed-out-receiving-message-from-renderer
github.com/bonigarcia/webdrivermanager/issues/442
Hi Raghav am install D's drive it it will be arising. Errors it not show any import statement
Please helpe me
Hi Asma, what does the logs say
It only execute on Chrome driver only not in Firefox , gecko,ie
will need to check the setup
Thanks
Most welcome
Hi @ Raghav i followed your code and try to run i got below error
could you please check and provide solution for this.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpRequestBase
at SeleniumTest.LoginTest.main(LoginTest.java:18)
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.methods.HttpRequestBase
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
Hi Kalyan, as per the error msg, there are some jars missing, Is this a maven project. Usually maven will take care of this, else you will have to add missing jars manually
Hello Raghav Sir,
I can't import
"import io.github.bonigarcia.wdm.WebDriverManager;"
can u tell me how to resolve that?
Hi Al Zaminur Rahman, hope you are using a maven project. Have you added the required dependency in pom.xml. You can save and rebuild your project after adding and try again.
@@RaghavPal Some maven dependencies are not being added when I save & clean the project.
I have added the following code in POM.xml and the problem is resolved.
spring-milestones
Spring Milestones
repo.spring.io/libs-milestone
false
happy to know this. Can you share the link for solution. Can help others
here is the link
stackoverflow.com/questions/18108080/errors-in-pom-xml-with-dependencies-missing-artifact
Thanks
Am getting this Error -Error: Could not find or load main class Test1(Test1 is java class)\
You might not have main function. Pls check
[Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities
Build info: version: '4.0.0-alpha-5', revision: 'b3a0d621cc'
System info: host: 'ASUS-PC', ip: '192.168.43.198', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_241'
Driver info: driver.version: FirefoxDriver]
getting this error for firefox
Hi Sonali, can you try with a diff browser
for chrome browser it is working.
Error: Could not find or load main class SeleniumTest
Got this error sir
Pls check the logs
Hi Raghav,
I recently started to follow your videos, they are excellent and clear to understand.
I have a small doubt there is an error when running the sample code. I add maven but I can't find the problem.
>> The error I got (java: package io.github.bonigarcia.wdm does not exist)
>> Below is my main class
import io.github.bonigarcia.wdm.WebDriverManager;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class SelTest {
public static void main(String[] args) {
WebDriverManager.chromedriver().setup();
WebDriver driver = new ChromeDriver();
driver.get("selenium.dev/");
}
}
>> And got blow errors as well
......................................................................
java: source value 1.5 is obsolete and will be removed in a future release
java: target value 1.5 is obsolete and will be removed in a future release
java: To suppress warnings about obsolete options, use -Xlint:-options.
java: Errors occurred while compiling module 'SeleniumWedDriver'
Checking dependencies... [SeleniumWedDriver]
Dependency analysis found 0 affected files
javac 1.8.0_25 was used to compile java sources
Finished, saving caches...
Module "SeleniumWedDriver" was fully rebuilt due to project configuration/dependencies changes
Compilation failed: errors: 6; warnings: 3
Executing post-compile tasks...
Synchronizing output directories...
21/10/2020 23:51 - Build completed with 6 errors and 3 warnings in 2 s 697 ms
Hi for the issue that java 1.5 is obsolete, you can add the maven-compiler-plugin source and target in pom.xml
This will help - mkyong.com/maven/maven-source-value-1-5-is-obsolete-and-will-be-removed-in-a-future-release/
After this add the dependency for webdriver manager again and re-build project and check again
github.com/bonigarcia/webdrivermanager/issues/251
@@RaghavPal Thank you for the reply, I tried both ways but It didn't solve my issue. I am using IntelliJ IDE. By the way, thank you for this.
ok I will check more
@@RaghavPal appreciate :)
anyone tell me where is the notes section
The description section, below the video
:)
Hi Raghav,
I am facing the below issue upon trying to execute a very simple program.I saw your video on Selenium WebManagerDriver and was trying a demo.
Project is a simple Java Project and I have added the jars webdrivermanger4.1.0 ,selenium-java-3.149.59 in the configure build path.
This is my code:
package brainboosters;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import io.github.bonigarcia.wdm.WebDriverManager;
public class Webdrivermanager {
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriverManager.chromedriver().setup();
WebDriver driver=new ChromeDriver();
driver.get("www.google.com");
driver.quit();
}
}
Getting the error Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ClassicHttpRequest
at brainboosters.Webdrivermanager.main(Webdrivermanager.java:13)
Caused by: java.lang.ClassNotFoundException: org.apache.hc.core5.http.ClassicHttpRequest
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
Tried adding httpcore.jar in configure build path.It did not workout.
Hi Veena, it can be due to incompatibility issues, Can check this for example - github.com/bonigarcia/webdrivermanager/issues/359
Thankyou for replying Raghav.Let me try using the exact same version in the blog.
I dont think so this is for beginners.Complicacy is very high sir..pls make it easy.. beginners means they know nothing
Hi Rohit, I will take and work on this feedback, I believe if you watch from video 1 of this series, it should be simple, but still I will try to go more basic with every video. You can check full playlist here - automationstepbystep.com/
After installing the Java dependencies, am getting the below error as:
'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.seleniumhq.selenium:selenium-java:jar -> version 3.141.5 vs 3.141.59
Hi Prashant, this can help stackoverflow.com/questions/23708691/maven-mvn-warnings-it-is-highly-recommended-to-fix-these-problems-because-they
i am getting this error - java: cannot find symbol
symbol: method chromedriver()
location: class io.github.bonigarcia.wdm.WebDriverManager
idont where i am going wrong?
Hi Rohit, will need to check the error and logs
No SLF4J providers were found. and its not opening google in chrome, what did I do wrong?
Sowjanya
The error "No SLF4J providers were found" means that Selenium cannot find a logging framework to use. There are many different logging frameworks available, and Selenium does not come with a default one.
To fix this error, you need to add a logging framework to your project. There are many different ways to do this, but one common way is to use the SLF4J library.
To add SLF4J to your project, you need to add the following dependency to your pom.xml file:
```
org.slf4j
slf4j-api
1.7.30
```
You also need to add a logging implementation to your project. A popular logging implementation is Logback. To add Logback to your project, you need to add the following dependency to your pom.xml file:
```
ch.qos.logback
logback-classic
1.2.3
```
Once you have added the SLF4J and Logback dependencies to your project, you need to configure Logback. You can do this by creating a logback.xml file in the src/main/resources directory of your project.
The following is an example of a logback.xml file:
```
%d{HH:mm:ss.SSS} %level [%thread] %logger{36} - %msg%n
```
This configuration will send all log messages to the console.
Once you have configured Logback, you should be able to run your Selenium tests without getting the error "No SLF4J providers were found".
The error "its not opening google in chrome" could be caused by a few things. One possibility is that you are not running the Chromedriver executable. Chromedriver is a program that allows Selenium to control Chrome. You can download Chromedriver from the Chromedriver website.
Another possibility is that you are not passing the correct browser arguments to Selenium. To open Google in Chrome, you need to pass the following browser arguments to Selenium:
```
--start-maximized
--disable-infobars
```
The --start-maximized argument will start Chrome in maximized mode, and the --disable-infobars argument will disable the infobars that appear at the top of the Chrome window.
You can pass browser arguments to Selenium by using the WebDriver.chromeOptions() method. For example:
```
WebDriver driver = new ChromeDriver(options);
```
where options is a ChromeOptions object that contains the browser arguments.
@@RaghavPal Thanks for the reply, I have only added slf4j, slf4j-simple and now its
Exception in thread "main" java.util.NoSuchElementException: No value present
What should I do about it? all the logbacks and options is a little too much for me now, any thing simple please. For now I am using the old set property instead of web driver manager
Strangely commenting out driver.close() resolves exception for now
can explore more on this