Selenium Manager | selenium-manager alternative to WebDriver Manager | Selenium Manager in 4.6.0

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys welcome back to testing universe in selenium 4.0 release selenium team has introduced a lot of new features as well as they have you know fixed lot of long pending issues and they're continuing to do so in the you know upcoming releases also so one such release is 4.6.0 we have an update here they're trying to introduce selenium manager which is similar to Webdriver manager so what they are trying to do over here is they're trying to give better user experience when if they want to start selenium automation script because what happens as soon as we start writing the script right if if the driver is not found we used to get illegal State exception or if the driver and browser version is not compatible then also we used to find some exceptions so they are trying to you know get rid of that because that is the starting point of writing a script right so earlier in our code we used to write system.set property or we used to make use of a third party utility which is called Web driver manager okay so even though we uh do the you know system.set property we make use of Webdriver manager sometimes we used to you know find this illegal State exception so they are trying to you know give a smooth user experience to the user who wants to you know write the automation script and then they want to you know download automatically the compatible version of the driver with the help of selenium manager so this has come in 4.6.0 release so this is the you know very very good and important feature which we should know okay so let's understand about this particular selenium manager it is it is a command line executable uh uh tool they have our utility I would say they have provided we will go in detail about that so before we start you know or before we go in detail if you have not already subscribed to our Channel please do subscribe and click on the Bell icon so before understanding in detail about selenium manager let's first see what they have you know given in this particular 4.6.0 release right so you can see over here on November 4th 2022 they have released 4.6.0 and these are the highlights adding support to CDP released in Chrome version 1.5 1.6 and related to CDP they have you know given the support as well as initial implementation of selenium manager across selenium bindings okay so we will go in detail about that and then they have done some improvements in terms of new Java HTTP 11 client as well as in you know Docker selenium images they have you know enabled observability and if some bug fixes also they have done if you want to go through that go through the change log so this is the you know selenium manager detailed uh you know a link or they have given over here I will provide this link in the description so what they are saying here get a working environment to run selenium out of the box with a new beta feature okay so this is the you know beta one version they have released and then they they are stating most people's first experience with selenium ends up with an error message like this one right what is the error message java.lang dot illegal State exception the path to the driver executable must be set okay so they're trying to you know avoid this or they are trying to get rid of this particular uh you know user experience and then it should run smoothly even though if you don't provide the web driver you know executable so that's what the intention over here is so what the they have given the detailed explanation so wants to improve the user experience and one of the first step is to help all users to simplify how they set up their environment configuring browser drivers has been for many years a task which users need to perform in order to have a working environment to run the selenium but configuring is not a big deal but nowadays what's happening every four to six weeks the you know browser versions are getting updated or in the sense they have you know a frequent release as browsers are releasing lot of new features frequently every four to six weeks so use selenium users will definitely get hit by this in the sense when when the browser is updated the driver version as well as the browser version will not be compatible and then you will start getting this particular illegal State exception or sometimes web driver exception so what they are introducing they are introducing selenium manager it's a new tool that helps to get a working environment to run right it's a beta 1 version it will be it will configure the browser drivers for Chrome Firefox and Edge for these three browsers if they are not present in the path in the sense let me go to my uh you know Eclipse if you have not set the Path system.set property or if you have not set web driver manager automatically they are going to configure the drivers for you okay so to run the selenium test with the selenium 4.6 you only need to have Chrome Firefox are Edge installed so at this moment you have to have the browsers installed on your system you have to have the browsers installed on your system if the browsers are not installed uh it is not going to download the drivers so that is the you know prerequisite they are mentioning to run the selenium test you only need to have Chrome Firefox or Edge installed okay if you already have browser drivers installed this feature will be ignored so selenium manager feature will be ignored as I have already stated if you have already downloaded and set the system property or if you are using the third party utility which is Webdriver manager then this selenium manager feature will be ignored maybe you know they're trying to uh push it stage by stage because in the beta 1 version only even though if you provide these things if it is downloading lot of you know companies are using it and the uh you know entire code might break so for that reason there they're going in a you know step by step process but in the long run this is going to be this is going to be you don't have to do all these things this is going to be the a selenium manager is going to be the uh you know one which you can make use of right so that that's what they are saying so they're also you know crediting it is not a new solution but you know with the inspiration of Webdriver manager they have you know we had web driver manager third party utility with the inspiration of that they have developed the selenium manager so they're they're trying to give a credit to already existing utility which is a very very good thing so if we want to go in detail okay we will go in detail about this it is a command line interface tool it will come along with you know when you mention or when you download the selenium binaries it will come along with that or you can also download this you know executable selenium manager executable from this repository this is the link they have given so for Linux Mac OS and windows okay so selenium manager dot exe you can download this and with this you know command line utility you can download you know on your own you can write your own code and then you can download the drivers whichever you want okay so we'll we'll go to this will download this and then we'll go to this in detail so for now uh let me just you know go to my eclipse and then we'll I will give you a demonstration I have selenium 4.5.0 I have selenium 4.5.0 and if I don't mention if I don't mention these two right I have commented system.set property as well as web driver manager.chromedriver dot setup if I I have commented out I am directly going into Webdriver driver driver is equal to new Chrome driver and then I am trying to open a URL if I run this code right I will straight away get illegal State exception you can see over here the path to the driver executable must be set okay so that till 4.5.0 that that was the you know uh State and then now I will update this to 4.6.0 those who are not using Maven uh project they can download the 4.6.0 binaries and then they can try this okay so now the same code if I run I will not get that error in 6.0 version it will automatically download the driver and then it will invoke that driver to launch our browser which is Chrome at this you know moment so where it will download it is going to download in the system cache and then from there it is going to invoke it is going to invoke the browser the respective browser and how it will download the compatible version of the Chrome right which is already installed in your system for that compatible version the Chrome driver will be downloaded ok so if I change this to Firefox driver I don't have Firefox driver uh Firefox browser in my system just for the demonstration I have installed so I will use Edge browser I will use edge browser sorry Edge driver I will use Edge driver and then it will download The Edge driver and then it is going to invoke the edge browser you can see here Microsoft Edge started successfully it's taking some time and it has loaded google.com Okay so similarly I don't have Firefox browser in my system installed that's what they State you have to have the browser installed on your system so if I mention Firefox driver right I am not going to get the browser launched I am going to get the illegal State exception and I just want to show you you can see here there is a warning over here find executable and unable to obtain driver using selenium manager you can see over here it is running a command right in app.local selenium manager dot exe which is downloaded iPhone iPhone driver and then gecko driver it is trying to You Know download that particular driver but the browser is not installed first it will check which browser the whether Firefox browser is there on your system or not if it is there then it will get the version of that browser and then compatible driver will be downloaded okay so that is the you know executable that's what you know we were mentioning it will invoke automatically so when I change this to 4.6.0 right if I go to my Maven dependencies you can see here there is a jar file which is called selenium manager and then you have a class selenium manager class and you can go through that and for each for each operating system you have a selenium manager executable so this will be invoked automatically right so that's how you can you know make use of selenium manager uh in your latest version if you are upgrading to 4.6.0 you can make use of that so for example if I specify system.set property if I specify system.set property I have a driver over here and then if I run this for example I will change this to Chrome driver okay if I run this it it still runs but it is going to ignore it is going to uh just a minute okay drivers Chrome driver dot EXE okay you can see I we have got an error that exe was not there but selenium manager could have downloaded the driver exe but it will not it will be ignored it is not going to invoke selenium manager because we have explicitly set the property okay so that is that is one thing if I if I make use of Webdriver manager it is the same case again Chrome driver dot setup and if I run it it will definitely run but not with the help of selenium manager it is with the help of Webdriver manager okay so maybe you know in future you don't have to have web driver manager you can download uh with the help of selenium manager okay so that is that is the you know the detail about selenium manager right and these are some of the scenarios I have mentioned when system property is not set right we can make use of selenium manager when system properties set selenium manager will be ignored when we are using third-party Webdriver manager selenium manager will be ignored as well as when browser is not installed I have also shown you that my in my system Firefox browser is not installed will will still get illegal State exception so that is that is the first part of selenium manager if if it comes along with the selenium libraries or selenium bindings the second one is you can explicitly download the selenium manager for your you know system and then you can make use of that to download on your own okay so this is the executable I have already downloaded that in my system you can see here selenium manager.exe so if I mention selenium manager.exe iPhone help it will give me lot of options you can see here you have to specify which browser you want to download or which driver you want to download either Chrome driver or gecko driver or Edge driver Ms Edge driver okay and Driver version so you have to explicitly specify the driver version and browser version for example one not five one not six or so either driver version or browser version you can give you cannot give both at a time okay so we will try to You Know download it dot exe hyphen iPhone browser I will mention Chrome so it has given me this info in this particular path Chrome driver has been downloaded okay let me go to that path you can see over here Chrome driver has been downloaded if I mention along with you know the browser the browser version for example hyphen iPhone browser version I will give one or two and it is it is giving me the version you can see here one or two five double zero six one one not seven here earlier one not seven because in my system at the moment it is one not seven now it is one or two because I have specified one not two okay so if you give browser version you cannot give driver version both the things you cannot give driver version for example I would mention this let me just you know copy this and then paste it here you can see it is mentioning ignoring browser version since driver version is also used so if driver version has been given along with browser version browser version will be ignored and the driver version will take the Precedence okay so that's how you can download explicitly you can also you know use this executable in your code and you can download explicitly and you can make use of all these different commands to have the cell are to download the drivers okay so that is the you know one of the important feature uh that's all about this feature at the moment if I get any new update because this is a beta 1 release if I get uh new updates about this particular you know feature they have also mentioned one thing in future in future you can see here selenium manager will eventually download browsers if necessary one of the scenario I have mentioned over here is the browser is not installed in my system that Firefox browser the next feature releases they might download the browser if it is or not already installed and then it will launch that particular browser so that they might be working on this you know particular update also I hope you have liked this video if you like it please subscribe to my channel and click on Bell icon as well as share this video with all your friends thank you so much for watching
Info
Channel: Testing Universe
Views: 2,113
Rating: undefined out of 5
Keywords: Testing Universe, Software Testing, Selenium Testing, Selenium WebDriver, WebDriver, Web Driver, Selenium Web Driver, Selenium Automation, selenium manager, Selenium Manager, webdrivermanager selenium, webdrivermanager chromedriver setup not working, webdrivermanager, Selenium Manager in 4.6.0, webdriver manager, system.setproperty in selenium, system.setproperty( webdriver.chrome.driver, illegalstateexception in selenium, selenium-manager.exe, selenium-manager
Id: CH2YShFfv-M
Channel Id: undefined
Length: 18min 58sec (1138 seconds)
Published: Sun Nov 06 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.