Downloading WebDriver Is No Longer Required For Selenium
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.
What sort of tasks would you usually want to automate?
Also, how many programming languages do you use on a regular basis?
Automating repetitive tasks saves a lot of time. I don’t code regularly. When I do, I mainly use python and sql.
I use it mainly for automated testing of browser-based applications.
Great thanks for this update
Have never used Selenium before, not a programmer but looks like the news is a great delight to users of Selenium, especially to you. But still thanks for the info and have a good day.
I read that it is mainly used for creating a bot.
I use it mainly for automated testing of browser-based applications.
Good day, thank you for the update. So, we can write whatever manuscript with selenium. How do I get it? Is it on chrome because I don't know about it. The way use talk about it, it means we would prefer it to other web browsers.
_please, @geekgirl, don't forget my request. I just want to get my children back to school and pay my rent. Honestly, I don't know how to sort that out with the present Nigerian economic condition. Thank dear sister.
It's great to hear that they made things easier. I think it's a great thing because it does sound annoying to update the driver every single time.
Dealing with outdated WebDriver versions in Selenium projects can be frustrating, but the recent integration of WebDriver with Selenium is a much-needed improvement. It makes automation smoother and more hassle-free. Your experience underscores the importance of staying updated with the latest tools and features to streamline development processes. Thanks for sharing your insights and staying informed.
I have not used Selenium but I know what if is used for. I think this update is good and will even make things easier
I have barely started my python journey, decided to do a course just for fun. Curious to see what will I be able to do with it, do have a couple projects in mind!
You will have a lot of fun with python.
Judging by the amount of possibilities with only a handful of commands that I've learned to far, totally agree with you! Thanks!
I haven't used this platform yet but as you mentioned it is interesting and good for programming so I will definitely try to use it.
Thank you so much for this quality update
$WINE
Wow, it's an amazing tool. Thanks for sharing the info. Could you please recommend me some tutorial to learn Selenium?
I don’t even remember where I first learned selenium. There are many free tutorials available online and youtube.
I am a desktop application developer by using (C #.net). I was thinking for move to web based application. I heard about Selenium that works for web browser automation. I think its a right time to work on this. Thank you for update.
What an amazing tool but hope it will not have a lot of restrictions now
Congratulations @geekgirl! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)
Your next target is to reach 39000 upvotes.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Check out our last posts:
Great post! I haven't used Selenium in a while either, so this is welcome news for my latest project. You might like the Software Engineering community, where we are trying to create a place for professional IT workers to ask for or give advice about tech-related skills and careers.
https://hive.blog/trending/hive-186568
#sbi-skip
It's inspiring to see how overcoming a simple hurdle like updating ChromeDriver led to the creation of such a powerful automation tool. This absolutely showcases the value of persistence and adaptation especially in problem solving and solutions.