2. Why Automated Testing?
Manual Testing Automated Testing
Manual testing requires human
intervention for test execution.
Automation Testing is use of tools to
execute test cases
Manual testing will require skilled
labor, long time & will imply high
costs.
Automation Testing saves time, cost
and manpower. Once recorded, it's
easier to run an automated test suite
Any type of application can be tested
manually, certain testing types like
ad-hoc and monkey testing are more
suited for manual execution.
Automated testing is recommended
only for stable systems and is mostly
used for Regression Testing.
Manual testing can be become
repetitive and boring.
The boring part of executing same
test cases time and again, is handled
by automation software in
Automation Testing.
3. What is Selenium
• Selenium is a free (open source) automated
testing suite for web applications across
different browsers and platforms.
4. Selenium Components
• Selenium Integrated Development
Environment (IDE)
• Selenium Remote Control (RC)
• WebDriver
• Selenium Grid
6. Who developed Selenium?
• Selenium was originally developed by Jason
Huggins in 2004
• He named this program as the
"JavaScriptTestRunner.“
• He made JavaScriptRunner open-source which
was later re-named as Selenium Core.
8. History of Selenium
• In 2004, Paul Hammant developed Selenium
Remote Control (Selenium RC) to solve the same
origin policy issue. This system became known as
the Selenium Remote Control or Selenium 1.
• In 2008, Philippe Hanrigou made Selenium Grid,
allowing running of multiple Selenium tests
concurrently on any number of local or remote
systems, thus minimizing test execution time.
9. History of Selenium Cont.
• In 2006, Shinya Kasatani of Japan created
Selenium IDE, a Firefox extension that can
automate the browser through a record-and-
playback feature.
• In 2006, Simon Stewart created WebDriver,
which was the first cross-platform testing
framework that could control the browser from
the OS level.
• In 2008, the whole Selenium Team decided to
merge WebDriver and Selenium RC to form a
more powerful tool called Selenium 2.
11. Important Notes
• Selenium WebDriver is termed as the
successor of Selenium RC which has been
deprecated.
• The Selenium IDE for Firefox stopped working
after the Firefox 55 upgrade and will be no
longer maintained.
12. Components Summary
• Selenium IDE, a Firefox add-on that you can only use in
creating relatively simple test cases and test suites.
• Selenium Remote Control, also known as Selenium 1,
which is the first Selenium tool that allowed users to use
programming languages in creating complex tests.
• WebDriver, the newer breakthrough that allows your test
scripts to communicate directly to the browser, thereby
controlling it from the OS level.
• Selenium Grid is also a tool that is used with Selenium RC
to execute parallel tests across different browsers and
operating systems.
• Selenium RC and WebDriver was merged to form Selenium
2.
15. Some WebDriver Methods
Method Description
void get(String url) Load a new web page in the current
browser window.
String getTitle() The title of the current page.
WebElement findElement(By by) Find the first WebElement using the
given method.
void close() Close the current window, quitting
the browser if it's the last window
currently open.
void quit() Quits this driver, closing every
associated window.
WebDriver.Navigation navigate() An abstraction allowing the driver to
access the browser's history and to
navigate to a given URL.
16. Some WebElement Methods
Method Description
void click() Click this element.
void sendKeys(CharSequence...
keysToSend)
The title of the current page.
String getText() Get the visible (i.e. not hidden by
CSS) innerText of this element.
isEnabled() Is the element currently enabled or
not? This will generally return true for
everything but disabled input
elements.
void clear() If this element is a text entry
element, this will clear the value.
17. Gecko Driver
• This program provides the HTTP API described
by the WebDriver protocol to communicate
with Gecko browsers, such as Firefox.
• Gecko Driver Download
https://github.com/mozilla/geckodriver
20. Project Implementation Steps
1. Create Project and Add Libraries
2. Launching a Browser Session
3. Read Test Cases From File
4. Run Test Case
5. Validate Output
6. Save Testing Results in File