Well, if you’re a beginner to automation in Python and you want to setup the development environment for working with Selenium, the first step is to download the webdriver that matches the version of your browser.
Now, some developers suggest you download a web driver and turn off the automatic updates for the Edge browser. If you do that, you might miss out on the new features of the browser. If you want to keep the updates on, then you will have to navigate to the page where you download web drivers and search for the appropriate version and download it each time a new update is released.
This is where the tool comes in. It automatically fetches the browser version using a small batch file and also fetches the PC architecture and downloads the appropriate version required for your architecture. So, the next time you want to download an updated web driver, you don’t have to search for the driver that matches your browser version. You just have to run this tool and it will be downloaded automatically. Please note that this code downloads the driver for the Edge browser only, but it can be modified for the browser of your choice.
Feel free to check out this code, download it, and use it.
[Here’s a link
to the code]
• A link to the demo video is also available, [here
Here are a few things you will have to do before running this code →
• Add the path of the edge executable (msedge.exe) to the system path.
• Make sure that the path to the edge executable in the batch file matches the path on your system. (You should do this only if you have changed the installation path of the edge.)
• Make sure that the batch file is present in the same folder as the code.