Selenium Beginners Tutorial | Selenium Testing Tutorials

Orange TechnoMind 27-Sep-2019
orange technomind

Selenium tutorial offers basic and advanced concepts of Selenium. Our Selenium tutorial is designed for beginners and working professionals.

What is Automation testing?

Automation testing is the application of tools and technology to testing software program with the purpose of reducing testing efforts, handing over capability faster and more cheaply. It facilitates in building better best software program with less effort.

What is Selenium ?

Selenium is an open source web automation framework which can used to perform testing web applications. It was originally developed by Jason Huggins in 2004 as an internal tool at Thought Works.Selenium works on multiple browsers like Chrome, Firefox, IE, Edge, Safari etc.It works with Java, Python, C#, Ruby, Perl and Groovy programming languages to automate the browser activities.

Advantages of Selenium

  • Selenium is an Open Source Software
  • It supports diverse programming languages to write Test scripts
  • Selenium supports various operating systems
  • Selenium supports various Browsers
  • Selenium supports Parallel Test Execution
  • Selenium uses less Hardware resources
  • Selenium Supports mobile devices

Selenium Limitations

  • No reliable Technical Support from anybody.
  • It supports Web based applications only.
  • It is difficult to use, takes more time to create Test cases.
  • It is difficult to Setup Test Environment when it compares to Vendor Tools like UFT, RFT, SilkTest etc
  • Limited support for Image Testing.
  • New features may not work properly.
  • No Test Tool integration for Test Management.
  • No Built-in Reporting facility.

Different types of Selenium 

Selenium 1.0 - Selenium IDE +Selenium Grid+ Selenium RC

Selenium 2.0 - Selenium IDE + Selenium RC + Selenium WebDriver + Selenium Grid or Selenium 1.0 +Selenium WebDriver.

Selenium 3.0 – Combination of Selenium IDE + Selenium WebDriver + Selenium Grid. Selenium RC has been removed in Selenium 3.0

Selenium tools and description

The suite bundle constitutes of the following sets of tools :

Selenium Integrated Development Environment (IDE) – it's miles a Firefox plug-wherein is effortlessly installable along with different plug-ins. since it has a simple framework, Selenium IDE have to be used as prototyping tool. For advanced use cases, Selenium RC or WebDriver could be suitable.

Selenium Remote Control (RC) – it's far a checking out framework that lets in the developers to write down the code in any programming language. Commonly it helps a extensive spectrum of languages like Java, PHP, Python, Perl, C#, etc.

Selenium WebDriver – This device has greater advanced features than that of RC and IDE. It applies higher method to automate the browser activities. It does now not normally depend upon JavaScript, it interacts with browser.

Selenium Grid – It works in conjunction with Selenium RC and runs tests on extraordinary nodes using distinct browsers concurrently.

Different components of Selenium RC

Selenium RC is also known as Selenium 1.0.The two components are

1. Selenium Remote Control server - acts as an intermediate between selenium commands and browsers

2. Client Library - Client Library gives a programming interface (API) which is nothing however a set of functions, which runs selenium, commands from your own test script. There \is a different client library for every of the supported programming languages.

Difference between Selenium Remote Control and Selenium WebDriver

Selenium Remote Control

1.Selenium Remote Control (RC) is used to write test cases in different Programming languages

2.we can able to run the recorded script in any browsers scuh as IE, Chrome, Safari, Opera etc

3.It interacts with browsers using Selenium RC Server

Selenium WebDriver

1.Selenium WebDriver is a tool used to automate testing for web application

2.It allows us to execute tests against different browsers like Firefox, Chrome, IE & Safari

3.Selenium WebDriver eliminated the use of Selenium Server, thus making it to work faster than RC

What is an API ?

API is Application Programming Interface.Webdriver is an API that acts as an interface to offer communication between programming languages and browsers. Selenium WebDriver provides set of classes that consist of several commandsthat we can use it in our test scripts to carry out a selected task for us.

Types of synchronization techniques in selenium WebDriver

There are two types of synchronization strategies available in selenium WebDriver.

1.         Implicit Wait

2.         Explicit Wait

What is Implicit Wait In Selenium WebDriver?

Using Implicit wait in webdriver software program checking out test case, we are able to ballot the DOM for positive amount of time when some element or factors are not available straight away on website.

What is explicit Wait In Selenium WebDriver?

The use of explicit wait code in selenium webdriver automation checking out device, you may define to watch for a sure situation to occur earlier than proceeding in addition check code execution.

What is locator?

Locators are the property value pairs or attributes of the web elements in HTML record structure. they are used to discover web detail at the web page. They supply the exact area of the web factors at the web page. we will say that the locators offer the cope with of web factors at the web page.

Different Type of Locators

Id - Syntax: driver.findElement(“xxx”));

Name - Syntax: driver.findElement(“xxx”));

ClassName - Syntax: driver.findElement(By.className(“xxx”));

PartialLinkText - Syntax: driver.findElement(By.partialLinkText(“xxx”));

Linktext - Syntax: driver.findElement(By.linkText(“xxx”));

X-Path - Syntax: driver.findElement(By.xpath(“xxx”));

CSS - Syntax: driver.findElement(By.css(“xxx”));

TagName - Syntax: driver.findElement(By.tagName(“xxx”));

What is TestNG?

TestNG is a open source automation testing framework in which NG stands for "Next Generation" which is used to design and maintain test scripts efficiently and generate test execution outcomes in the form of HTML record. It covers a extensive range of testing from Unit testing to end-to-end testing.

Advantages of TestNG

  • It gives effective HTML file that explains test execution result.
  • It lets in parallel execution of check cases.
  • It helps parameterization the usage of @parameters annotation.
  • It gives flexibility to prioritize check instances.
  • It offers flexibility to ignore the execution of test instances.
  • It gives assertions to take a look at the expected and actual outcome.
  • It supports grouping of take a look at instances.
  • It supports data driven trying out the usage of @DataProvider annotation.


It's also a testing framework like TestNG. however, TestNG has a few extra beneficial features in comparison to JUnit. So we will say TestNG is the improved model of JUnit.

Difference between JUnit and TestNG



JUnit does not provide @BeforeSuite, @AfterSuite, @BeforeTest and @AfterTest annotations.

TestNG provide @BeforeSuite, @AfterSuite, @BeforeTest and @AfterTest annotations.

JUnit does not provide Grouping of test cases

TestNG provides Grouping of test cases

JUnit does provide parallel execution of test cases

TestNG provides parallel execution of test cases

Achieving Parametrization is more complex than that of TestNG

Achieving Parametrization is not complex

JUnit does not provides Dependency of a method on other methods functionality of test cases

TestNG provides Dependency of a method on other methods functionality of test cases



Contact Us

If you have a question, we have an answer. If you need something, we'll help you. Contact us anytime.

For enrollment related queries & support

+91 99 40 550 285

For technical issues & support