Chrome Browser and ChromeDriver version mismatch issue - Resolved | Selenium Tutorial Part #6

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome back in cool id help this is the selenium web automation tutorial 6 and in this tutorial session we are going to see an easy way to avoid chrome and chrome driver version mismatch issue sometimes we need to port our selenium script to different machine but we are not sure on that machine chrome driver or chrome browser versions are same so we will find the mismatch and our selenium script will not work in some cases we are giving our selenium script to end user to run it in a form of executable or an runable jar format in that case we are bundling our chrome driver exe inside it but we are not sure this will work on that target machine because there is a huge possibility that chrome version is different on that machine we can avoid this thing with the help of web driver manager web driver manager api we can use it we have a set of jars and web driver manager jar file has some dependencies we can download it in one shot if you are use not using the maven project so we have to proceed with the manual way we will download the jar files or then we will add inside the project if you guys using the maven project then this is better choice you can simply add the dependency which is right here also the dependency given in the description box as well so you can use it and now in this example we are using the simple way we are going to download it manually then we will add in the project and then we will see how to use it it's very simple first just copy this link and visit on a chrome browser and now you will be landed on this page this is the download location for that jar file so here's the right button just click on it to download within few seconds downloading will start the file size is not big only 3.8 mb in size the file is downloaded now i will put it at a separate place and then i will extract it so i have already downloaded the zip file now i will extract this one okay we got this folder let me check inside so we have all these jar files which are required with driver manager now let me take you inside the eclipse so guys this is the eclipse and we have a sample project that we have used in we have used in our last selenium automation tutorial this is a simple chrome driver loading statement after that we have created one driver object chrome driver instance and then with the help of that we are navigating to the website then we are going to find the elements this is the simple script with the help of driver manager we can avoid the statement well now i will show you first you need to add all those jar files that we have downloaded so here are the jar files so i'm going to add here in the class path okay all jar files are added now we have to use simple one statement to avoid the statement number 12. okay that is very simple we will use the driver manager class that will handle rest of the thing so here is this simple statement webdrivermanager.chromedriver.setup so the setup method will do everything for you you don't need to worry about the chrome driver version and chrome browser version this will handle the things automatically and you are free now you will not face the driver chrome driver and chrome browser version mismatch issue now the rest of the thing will be as it is i have just saved it and doing a clean build of this project now we will do it a test run here we go right click run as java application okay see at the console chrome driver was started successfully and now the page is loading here in this selenium browser so website is loaded now we have just simply written one click event after finding the particular element on that so this is just clicked on that link and the page is loaded so a script executed properly without any issue so guys this is the way you can avoid that version mismatch issue every time when you are doing the things with the selenium and i hope you guys found this video tutorial relevant and useful please hit the like button and don't forget to subscribe my channel and for now thanks for watching cool id help
Info
Channel: Cool IT Help
Views: 46,403
Rating: undefined out of 5
Keywords: Chrome and chromedriver version mismatch issue, Version mismatch between ChromeDriver & Chrome, Workaround for wrong chromedriver version, selenium script, automation script, web automation, chrome web automation, desktop automation, sikuli api
Id: WnxGF3SLACE
Channel Id: undefined
Length: 5min 6sec (306 seconds)
Published: Thu Mar 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.