Selenium is a Test Automation tool for Web Applications. Unlike QTP, TestComplete, or any other market leading commercial automation tools Selenium does not have a good IDE (Integrated Development Environment) for development of automation scripts. Unless having a good knowledge of a programming language such as Java or C#, it is very difficult to understand the way Selenium works although it looks very simple. One more point I want to make it very clear is that Selenium lacks a good User Guide since it is a open source tool. Of course, I agree that Selenium’s documentation is very good and comprehensive. But it is a little difficult for the testing engineers who are newly learning automation concepts and lacking good programming skills.
After listening to many testers who want to learn Selenium, I wanted to provide some guidelines which will help learning Selenium.
Some of the very much popular questions I saw on Selenium forums are:
- I am very much new to Selenium, how I can Record and Playback scripts?
- I don’t know how to setup Selenium with Eclipse IDE?
- Is there any need to learn Java in order to automate test cases using Selenium?
- How to create Data driven framework for Selenium?
- How to use JUnit with Selenium?
Basically we need to understand some concepts before starting to use Selenium for automation.
- What is test automation?
- Why the Test Automation is needed?
- How a Functional Test Automation tool works?
- Which is the programming language / scripting technique used with the tool?
- What is programming skill and how can I improve my debugging skills?
- Does the tool support IDE or should we use some other IDE for development of automated test case?
According to me first and foremost thing which is needed for an automation tester is having good programming skills.
“Practice makes man perfect” – write more and more programs that helps you to improve programming logic and debugging skills.
Before starting to learn Selenium, it is better to learn Java (or C#, Ruby, PHP, Python) and develop good debugging skills. Debugging is nothing but executing the program step-by-step and find out the values of variables used in each step. Thereby find out the root cause of the issues (if any) with the program we have written. This greatly helps a programmer or an automation tester. With Selenium, programming skill is very much important.
How to learn Java (or any programming that Selenium supports) and acquire debugging skills?
- Learn Java starting from “Hello World!!” program. Download Eclipse IDE and learn how to use it.
- Understand the data types, looping structures, flow controls (if else, switch case)
- Learn OOPS (Object Oriented Programming System)
- What is a class, object, and method? What is encapsulation? What is an access modifier?
- Inheritance, Polymorphism, Method overloading / overriding, constructors / destructors
- Learning exception handling is very important. Because whenever Selenium / Java throws any kind of exception we can easily understand why the exception is thrown and the type of exception.
When I mentioned all these concepts, don’t think that it is too much to learn. It is just Core Java. Only thing is we need to write a lot of programs which explain the concepts. Once these concepts are clear, then keep on writing / executing simple-to-complex programs and execute them step-by-step. Watch the variables during the execution to enhance debugging skills.
What next?
- Download and install Selenium IDE
- Download some open source web application (Google and find out some open source web application, there are many on the internet)
- We can even utilize some of the web sites online (such as any technology forums) which contain all different types of objects (edit boxes, tables, drop downs, radio buttons, check boxes, etc)
- Record some test scenarios and try to play back step-by-step (click and run each step on the IDE, otherwise there is a chance that you might not be able to execute the entire script because of the application loading time)
- Once you are comfortable with Selenium IDE and the APIs, then try to export them and save to some notepad.
- Go through the code.
All these steps look tedious but it is very easy to follow, it does not even take a week’s time. Once these are done, download Selenium-Java-Client driver and integrate that with Eclipse IDE. Now, you can straight away export all the scripts recorded so far to Eclipse IDE and execute them.
That’s it!!
Learn Selenium and enjoy the freedom of Open Source.
I have one doubt.
child window is not having any id,name,title. Then we want to create name for that window dynamically.My question is how to know whether child window is having id,name,title or not.
And how to know the window is java script or not
Hi
I am working on manual testing. i completed 1 year now i am planning to go for automation testing. i am very very poor in programming. shall i go for selenium or any other tool ???
Please suggest me.
If you have interest in programming you can improvise that is not a problem. If you want to take the test automation as career, then you can definitely do it….
Hi
Thank you. i am working for mobile application testing (iphone, android, black berry and mobile web app). i m looking forward in this field. so regarding this field i want some information about automation tools. Like which is best tool in market now (mobile app tool)
what are the basic requirements for this tool.
Hi
am fresher…. am looking forward to this field of selenium testing tool…. how it wil be to my feature and suggest me…. hoe to start…. and is java language is require for learning this tool…. and what all are required to learn this testing tool…..
Please suggest me…………….
I am having 8 years exp in manual Testing and have very less programming skills. Should I go for selenium. And what are the basic requirements.
hi seetaram,
Regards for your valuable info provided in the site. I have noted that your site was developed using WP and the critical part is its allowing to enter your admin page, I suggest you to hide your admin page by using some plugins of WP.
Hi
I am working as QA on Hotsmart watch APPs(testing all the functionality of the APP-how the notification is fetched from mobile) ,i have done manual course and i am planning to do selenium but i am very poor in programming.Can you give some suggestion whether i have to learn anything else before joining to selenium .I am looking forward for a career in automation .so please give some suggestions to me.
Hi
I am geetha. Working as a recruiter in VLSI domain. But i am intrested in testing. want to change my field into software. To learn selenium. what are the basics i need to undergo. Please suggest me. I would be grateful to you.
Thank you
regards
Geetha
The above article is from 2011. There wasn’t many more options with Selenium IDE back then. However, things got better.
Would you like more value out of Selenium IDE? Use SeLite. It supports
– functions shared across test cases, loops, and other code structures
– enhanced expressive syntax
– test database (isolated from the application database)
– automatic detection of webserver errors/warnings
– custom fine-grain configuration.
See https://selite.github.io.