Selenium-1 || Understanding Selenium and Selenium WebDriver.

Selenium is a set of tools to automate the web applications. Selenium WebDriver is a powerful tool in selenium package. It helps to identify the component on a web browser, perform an action, comparing the result and generating the reports.

Selenium Packages:

Selenium Packages

Selenium is basically a package of n number of tools and utilities to make automation process easy, reliable and reusable. Majorly it contains below packages:

Selenium IDE:
  1. It stands for Selenium Integrated Development Environment.
  2. Easy to install as chrome and firefox extension.
  3. Having record and play ability.
  4. We can also edit and debug the script.
  5. Script can be converted into multiple languages.
  6. Simple commands to open URL, assert and verify titles, sending user-defined values, click on web elements.

Selenium Tutorials:

Window Handling: 

Test Frameworks: 

Related Links: 

Selenium RC:
  1. Stands for Selenium Remote Control.
  2. Supports client/server architecture.
  3. Can control any web browser on the local machine or remote machine using any programming language.
  4. Works in Multiple frameworks.
  5. Overcome the limitation of Selenium IDE and more powerful.
Selenium Grid:
  1. Extended version of Selenium RC.
  2. Runs test scripts on multiple servers at the same time using Selenium RC.
  3. Works on Hub-node concept using DesiredCapabilities and the RemoteWebDriver objects
  4. More on Selenium Grid…
Selenium WebDriver:
  1. Runs script without any client/server.
  2. Most popular automation tool in today’s world for web applications.
  3. WebDriver is an interface which would be used as a reference object for different browsers.
  4. Consist many API which provides n number of methods to play with browsers.
  5. Support multiple operating system and browsers.
  6. Supports multiple languages and frameworks.
  7. WebDriver is faster than RC as it makes a direct call to browser through browser drivers.
  8. It can’t support readily new browsers. We need to update browser drivers time to time according to the browser version.

WebDriver Architecture:

WebDriver Architecture

WebDriver has three level of communication while execution of the code as described in the above figure. Along with the WebDriver files we also need to download specific browser driver in exe form and keep the same on local system hard drive. Which can be used in the programming later.

Basic and Most powerful features of Selenium:

Selenium Features

Sample Code:

public class LaunchBrowsers {
        WebDriver driver;
        public static void main(String[] args) {
                LaunchBrowsers obj=new LaunchBrowsers();
//                obj.launchChrome();
//                obj.launchIE();
        public void launchChrome()
                driver=new ChromeDriver();
        public void launchIE()
                driver=new InternetExplorerDriver();
        public void launchFirefox()
                driver=new FirefoxDriver();

WebDriver Methods:

There are so many inbuilt methods are available to handle web browsers.


Driver.close() : To close the currently active browser tab/window.
Driver.quit() : To close all the browser tabs/window associated with the WebDriver object.

Leave a Comment

Your email address will not be published. Required fields are marked *

   YouTube ChannelQuora

            Ashok Kumar is working in an IT Company as a QA Consultant. He has started his career as a Test Trainee in manual testing in August 2010. Then he moves towards the automation testing after 4 years. He started learning JAVA and Selenium by self to get the knowledge of automation.

       While learning these tools and working on multiple projects, he found that sometimes people get stuck in live scenarios in their project and they have to do lots of RnD to get out of it. So he decided to start blogging only for such scenarios, where anyone facing any problem in their project, can ask any question or give a solution or you can say an alternate solution to achieve the goal successfully.

Later on, he observed that some people want to learn Java but they have few questions in their mind like how to start Java, whether we should go for the online or offline course. So he started writing tutorials on Java, Jira, Selenium, Excel etc.