Selenium is an open-source automated testing tool
designed for cross-browser application testing. According to SeleniumHQ - 'Selenium automates browsers'. How we harness
this power completely depends on our strategies. Selenium automates web
browsers as well as the web-based administration tasks. There is a high probability that Selenium will
be a native component of most of the popular browsers in the near future.
Knowing about Selenium
The initial release of Selenium had four main
components. It is referred to as SeleniumRC
-
Selenium Integrated Development Environment(IDE)
-
Selenium Remote Control - Selenium(RC)
-
Web Driver
-
Selenium Grid
Later, the component Selenium(RC) and WebDriver
were merged to form Selenium 2, also known as Selenium WebDriver. Selenium RC
has been officially deprecated.
Selenium IDE: It
can be implemented as Firefox extension. It allows us to record, edit and debug
tests. It is a complete Integrated
Development Environment for Selenium scripts. It is an ideal environment for
Selenium tests with its autocomplete support, optional recording capability and
editable test scripts.
Selenium WebDriver: It is
the primary feature of Selenium2. It is the first cross platform testing
framework which could control the web browser from the operating system
level. It is a simple and more concise
Object Oriented programming interface. Selenium WebDriver was developed to
provide enhanced support to dynamic webpages where elements and contents of a
page change without reloading the page.
Here, tests need to be written in Java. The implementing classes used
are listed as follows:
-
AndroidDriver
-
CromeDriverFirefoxDriver
-
InternetExplorerDriver
-
SafariDriver
-
HtmlUnitDriver
-
EventFiringWebDriver
-
RemoteWebDriver
-
PhantomJSDriver
Selenium Grid:
Selenium Grid was developed to minimize the testing execution time as much as
possible. It captured browser screen shots and sent out Selenium commands to
different machines simultaneously. It works on the hub-nodes concept. The hub acting as the main source of
Selenium, commands to each connected node.
Pros
and Cons of Selenium Automated Testing
The
advantages of using Selenium are as follows:
-
Low
Cost Tool – Since it is an open source tool it can be easily downloaded and
programmers can easily use the tools to automate the web application testing in
any scripting language.
-
Browser
Compatibility Testing : Applications can be easily tested across multiple web
browsers
-
Supports
multiple programming languages: The Selenium client languages can be easily
imported into popular languages such as Net Beans, .net, Eclipse etc.
-
Multiple
Testing Frameworks: It supports a variety of testing frameworks such as JUnit,
PHPUnit and TestNg
-
Easy
Integration with the Eco system: It can be integrated with various kinds of
test suites such as Selenium Grid, Ometry, Saucelabs etc.
-
AJAX
Support: It supports for ajax functionalities and helps to monitor changes in
content without page reload.
-
Open
for Enhancement: Since it is open source, developers are free to expand the
Selenium functionalities for more complex testing.
-
Enables
Comprehensive Testing: It can be used for Functional, Regression, Usability and
UAT Testing.
-
Test
Driven Development: It is mainly used in the Agile and Extreme Programming
community areas.
The
various disadvantages of Selenium Testing are as follows:
-
Testing
Roadblocks: It may show erratic or unpredictable behavior after injection of
Selenium code into HTML source files for testing.
-
Finding
Locators: Common attributes like Names, IDs, XPATH, DOM need to be located
using firebug.
-
Limited
support from browsers: To run test scripts on multiple browsers, they need to
be written on Selenium IDE with Selenium core. Otherwise, the testing can only
be carried out on Mozilla. Data Driven Tests are not supported by this
framework.
-
Implementation
difference may slow down the performance of certain methods.
Selenium is at the core of many browser
automation tools, APIs and frameworks. Recently, HP has enhanced its Unified
Functional Testing(HP UFT) Tool and released LeanFT(Lean Functional Tool) which
integrates the open-source Selenium features with that of its UFT Tool
features.
Conclusion:
High
quality documents and guides are available for Selenium which makes its
learning and practice easier. Selenium is by far the most advantageous
automated testing tools in terms of cost and flexibility.
Nice blog. I appreciate your effort.If anybody looking for best selenium training in Bangalore , then visit Infocampus. They provide hands-on real-time projects and 100% placement assistance.
ReplyDelete