A BRIEF INTRODUCTION TO SELENIUM AUTOMATION TESTING.
This week as part of the process for my internship, I joined the Application Department Team. I started my internship in the IT section of Dangote Limited (Dancom) 3 weeks ago. It is expected we do a quick tour around the various departments such as Service Delivery, IT applications, Networking, Infrastructure, etc. I started my own tour in the Service Desk Delivery Department and early this week I resumed at the IT Applications Department. I will be talking more about what I learned in the IT Applications Department this week. You may ask why but I am someone who is passionate about technology and I believe so much in impact.
Yo! So this week in the application department, we started with software testing automation. I will love to share what I have learned so far because as I said earlier, I am someone who believes a lot in impact and I believe one day this post will help someone have a knowledge of what software automation testing is all about.
WHAT IS SELENIUM AUTOMATION TESTING ALL ABOUT
First, what is Selenium? Selenium is a portable framework for testing web applications. Selenium provides a playback tool for authoring functional tests without the need to learn a test scripting language.
Testing done using the Selenium tool is usually referred to as selenium testing. Selenium is not just a tool but a suite of software, each catering to different testing needs of an organization. There are four in number which includes:
- Web Driver
- Selenium Integrated Development Environment (IDE)
- Selenium Remote Control (RC)
- Selenium Grid.
I will focus on the web driver.
WHAT IS SELENIUM WEB DRIVER?
Web Driver is a web automation framework that allows you to execute your tests against different browsers, not just Firefox, chrome.
HOW MY INSTALLATION OF THE SELENIUM WEB DRIVER WAS CARRIED OUT
I installed Java on my computer(JDK)
Then I installed the eclipse IDE on my computer. (You can get to download eclipse from the web )
I downloaded the Selenium Java Client Driver (this can be downloaded from the web)
Then the configuration of the eclipse IDE with the web driver.
Someone might be asking, how can I configure my eclipse IDE with the Web Driver. Well not to worry, I gat you! 😀.
First, you have to Launch the “eclipse. exe" file. Inside the eclipse folder, we extracted earlier. If you did it correctly, the executable should be located in C:\eclipse. exe. When asked to select a workspace, just accept the default location.
Don’t mind the picture in the background 😀. Focus on the workspace!
Then you create a new project file, package, and Java Class. When you are done with that, we can now put the selenium Web Driver into Java build path. It goes like this:
Click on the new project you created.
On the properties dialog, click on “Java build path”.
Click on the Libraries tab, and then
Click on “Add External jars"
When you click on “Add External jars" it will open a pop-up window. Select the JAR files you want to add.
After selecting this then you click on OK. Your properties dialog should look like this image below.
Finally, click OK and we are done importing selenium libraries into our project... Congratulations!!! 💃
WHAT MY FIRST WEB DRIVER SCRIPT WAS LIKE
I wrote a web driver script with Java and with the use of the Eclipse IDE that could fetch the Dangote's Dispatch website (that is a website we use at Dangote), fill out my Login details, log into the site on its own and fill out a form on the site.
A screenshot of the code is below:
It has been a great experience this week and there are a lot of things to learn in the subsequent weeks which I will be happy to share with you guys. When you write about something, you get to learn more and educate more people out there.
To know more about the Selenium Testing and how the code was written, visit my colleagues post on Finding and Testing A Web Element using Selenium Web Driver and Java.
Special ShoutOut to my Tutor who taught me all these Ibrahim Gana and Harrypanritmwa
Thanks for reading!!