This is not news. Apparently, this change happened sometime last year. I wasn't aware of it because I haven't been using Selenium in a very long time. When I discovered that a WebDriver is no longer needs to be downloaded for Selenium projects, it was a pleasant surprise and welcome feature for me. Selenium is a great tool. But one thing that was always annoying is to keep up with the right version of the WebDriver.
Selenium is an awesome web automation tool. We can write scripts to automate almost anything we do manually when browsing the web. I have used it with python scripts in the past. It is possible to use Selenium with other programming languages like Java or JavaScript as well. My default programming language is python, and writing Selenium scripts has always been fun, especially the end result. When browsing the web or automating web we usually have multiple options like Chrome, Safari, Firefox, Opera etc. Each of them have their own WebDrivers. I normally use Safari and Chrome, but always Chrome for automating. For web automation using Chrome browser, we would need to download a ChromeDriver, and providing the path to the ChromeDriver Selenium script would be able to launch the browser and perform all the fun tasks we write in our code.
It wasn't too complicated, and worked just fine. But since browsers get updated frequently, in a very short time the ChromeDriver used in scripts written few months ago would stop working. Since the Chrome is updated to newer version, now it would require us to download newer ChromeDriver version as well. That too is not a complicated thing to do. Delete a file, download the correct one. But it definitely was annoying, because it seemed like an unnecessary step, but also would take some time before realizing what the problem was. And it is always annoying to see old scripts stop working, because if we haven't used them in a while, we may need to read through it again to remember what did what. It is always great to see scripts running for a very long time without much of review and debugging.
Recently I was involved in a project that required using Selenium. The project had to do with automating tasks within a complex web application. It was enterprise software that connected many different departments of the organization. It would connect to the various databases and work products by various departments and generate data and reports. Initially I wanted access to the database, I didn't even want to deal with the web app. Having access to the database would make things a lot simpler and would give more flexibility of how to use the information obtained. But database access wasn't an option, and the only way to access all needed data was by launching the web app and performing sequences of various inputs and clicks. At first, I wasn't even sure that Selenium would be able to help with all that needed to be done. But it had to be the first thing I would try.
It's been a while since I used Selenium. Normally when I want to use the tools I have used in the past, what I do is go to old projects and see if they still work and remind myself how certain tasks and processes were achieved. The very first Selenium project I start doesn't work. Gives an error. Instead of dealing with error message, I go to another projects. And then another. None of them work. Then I realized that ChromeDriver had to be updated. Obviously, Chrome has been updated multiple times by now, so I needed the latest stable ChromeDriver. Unfortunately, I wasn't able to find one right away. When I did find one, they weren't working either. The same thought I had multiple times before came to mind. What does this need to be so complicated. Why wouldn't such a powerful tool like Selenium just integrate the WebDrivers or get from the cloud automatically. Automating tool couldn't automate something for itself? This is when I realized that the thing I was wishing for became a reality sometime last year with the version 4.10.
This is great news (old news)! Thank you Selenium I said to myself and had to test it right away.
import time
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://www.google.com/")
time.sleep(5)
After copy pasting a sample code and hoping it will actually do something, I was not disappointed. Chrome opened up and confirmed that ChromeDriver is indeed no longer needed to be downloaded and updated. This simple success was a motivation enough to actually getting started with the project. After three days of coding and a couple thousand lines of code, an automation tool was created that would perform tasks seconds which would take hours manually. The project wasn't just about interacting with the web app. It was the biggest part, but it involved other components that actually made all the work meaningful and productive.
Believe it or not, the biggest challenge in completing this project was getting started with/without ChromeDriver. If you have old Selenium projects, remember to make necessary changes to keep the functioning properly. It is a lot simpler now. I am sure I will be using Selenium more often in future.