SlideShare a Scribd company logo
Softsmith Infotech 1
Test Automation Using
Selenium
Softsmith Infotech 2
Test Automation
• Test automation is the use of software
To set test preconditions.
To control the execution of tests.
To compare the actual outcomes to predicted
outcomes.
To report the Execution Status.
• Commonly, test automation involves
automating a manual process already in
place that uses a formalized testing
process.
Softsmith Infotech 3
Why and When To Automate?
• Frequent regression testing
• Repeated test case Execution is required
• User Acceptance Tests
• Faster Feedback to the developers
• Reduce the Human Effort
• Test same application on multiple
environments
Softsmith Infotech 4
Test Automation Tools
Quick Test Professional By HP
Rational Functional Tester By Rational (IBM Company)
Silk Test By Borland
Test Complete By Automated QA
QA Run (Compuware )
Watir ( Open Source)
Selenium ( Open Source)
Sahi (Open Source)
Softsmith Infotech 5
Selenium
• Selenium is a robust set of tools that supports
rapid development of test automation for web-
based applications.
• Selenium provides a rich set of testing functions
specifically geared to the needs of testing of a
web application.
• Selenium operations are highly flexible, allowing
many options for locating UI elements and
comparing expected test results against actual
application behavior.
Softsmith Infotech 6
Selenium Features
• Supports Cross Browser Testing. The
Selenium tests can be run on multiple
browsers.
• Allows scripting in several languages like
Java, C#, PHP and Python.
• Assertion statements provide an efficient
way of comparing expected and actual
results.
• Inbuilt reporting mechanism.
Softsmith Infotech 7
Selenium Components
• Selenium IDE
• Selenium Remote Control
• Selenium WebDriver
• Selenium Grid
Softsmith Infotech 8
Selenium IDE
• Selenium IDE is an integrated development
environment for Selenium tests.
• It is implemented as a Firefox extension, and
allows you to record, edit, and replay the test in
firefox
• Selenium IDE allows you to save tests as HTML,
Java, Ruby scripts, or any other format
• It allows you to automatically add assertions to all
the pages.
• Allows you to add selenese commands as and
when required
Softsmith Infotech 9
Selenium IDE - UI
Start and Stop
Recording
Selenese
Script
Editor
Selenium Log
Replay
Toolbar
Accessor
Area
Softsmith Infotech 10
Limitations of Selenium IDE
Can run the test only on Firefox
No Programming login (like loops,
conditional statements) can be applied
Selenium IDE can execute scripts created
in Selenese only.
It is difficult to use Selenium IDE for
checking complex test cases involving
dynamic contents
Softsmith Infotech 11
Selenium RC
A solution to cross browser testing.
A server, written in Java and so available
on all the platforms.
Acts as a proxy for web requests from
them.
Client libraries for many popular languages.
Bundles Selenium Core and automatically
loads into the browser
Softsmith Infotech 12
How Selenium Works
Softsmith Infotech 13
Client Drivers
Enables communication with Selenium Remote Control
Server.
Functionality of Selenium is exposed via these drivers.
Available in Ruby, Python, Java, C-Sharp …and so on.
Give access to the rich features and libraries of the
language, including their unit testing framework.
Makes it possible to develop automated scripts in the
same language as product.
Which one you should use?
Whatever make sense in your context. Most Popular is java and for
the training we will use java
Softsmith Infotech 14
Selenium Libraries
Softsmith Infotech 15
Script View
Softsmith Infotech 16
Example 1 – Get the values from the list box and
check if the value “HTML” is present in it
Implementation Steps
1) First get the values from the list box
2) To get the values from the list box or any
other HTML element we need to know its
Xpath. (use Xpath checker)
3) The values taken from the list box are
stored in a variable.
4) Use the indexOf method to find if “HTML”
is present in the extracted variable.
Softsmith Infotech 17
Screen Shot of the Example Script
Xpath Locator
Softsmith Infotech 18
Selenium-Grid
Selenium-Grid allows the Selenium-RC solution to scale for test
suites or test suites to be run in multiple environments.
• With Selenium-Grid multiple instances of Selenium-RC are running
on various operating system and browser configurations, each of
these when launching register with a hub. When tests are sent to
the hub they are then redirected to an available Selenium-RC, which
will launch the browser and run the test.
• This allows for running tests in parallel, with the entire test suite
theoretically taking only as long to run as the longest individual test.
Softsmith Infotech 19
Best practices
• Use Selenium to verify workflow and
session
• Don't put Selenium tests in your main
development build – run them overnight
• Have dedicated machines that run tests
• DON'T THINK OF THIS AS A
REPLACEMENT FOR EXPLORATORY
TESTING!!!
Links
• http://gojko.net
• http://www.openqa.org
• http://www.solutionsiq.com/agile2008/agile-2008-
domain.php
• http://storytestiq.solutionsiq.com
• http://www.cubictest.com
• http://fitnesse.info/webtest

More Related Content

What's hot (20)

PPT
Selenium2 and Jenkins: Almost pain-free UI Testing
mikereedell
 
PPTX
Python in Test automation
Krishnana Sreeraman
 
PPTX
Learn SELENIUM at ASIT
ASIT
 
PDF
Selenium - Introduction
Amr E. Mohamed
 
PDF
Basics of Selenium IDE,Core, Remote Control
usha kannappan
 
PPT
Selenium
BugRaptors
 
PPTX
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society
 
PPT
Selenium
Sun Technlogies
 
PPT
Selenium
Daksh Sharma
 
ODP
Selenium ppt
Anirudh Raja
 
PPTX
Selenium tutorials
Ducat
 
PPTX
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
eleksdev
 
ODP
Mastering selenium for automated acceptance tests
Nick Belhomme
 
PPTX
#1 unit testing
eleksdev
 
PPT
Selenium
Ruturaj Doshi
 
PPTX
Selenium web driver
Sun Technlogies
 
PDF
Testing with Spring: An Introduction
Sam Brannen
 
PDF
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
Sam Brannen
 
DOCX
Selenium notes
wholcomb
 
PDF
Selenium Test Automation - Challenges
Arul Selvan
 
Selenium2 and Jenkins: Almost pain-free UI Testing
mikereedell
 
Python in Test automation
Krishnana Sreeraman
 
Learn SELENIUM at ASIT
ASIT
 
Selenium - Introduction
Amr E. Mohamed
 
Basics of Selenium IDE,Core, Remote Control
usha kannappan
 
Selenium
BugRaptors
 
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society
 
Selenium
Sun Technlogies
 
Selenium
Daksh Sharma
 
Selenium ppt
Anirudh Raja
 
Selenium tutorials
Ducat
 
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
eleksdev
 
Mastering selenium for automated acceptance tests
Nick Belhomme
 
#1 unit testing
eleksdev
 
Selenium
Ruturaj Doshi
 
Selenium web driver
Sun Technlogies
 
Testing with Spring: An Introduction
Sam Brannen
 
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
Sam Brannen
 
Selenium notes
wholcomb
 
Selenium Test Automation - Challenges
Arul Selvan
 

Viewers also liked (18)

PPT
E150425 sustaining our_common_future
Harm Jaap Smit
 
DOCX
3 texto
Katerin Colcha
 
PDF
すごいHaskellたのしくHeroku!
Haruka Nakajima
 
PDF
[사회복지사복수교육]무사고로 질주하는 IT업무환경 만들기
NpoITcenter_Kor
 
DOCX
положення про-наукове-товариство
Александр Грустилин
 
PPT
Mobile Sites with Moovweb
Naseem Makiya
 
PDF
Docker やってみた
Fumihiko Nishio
 
PDF
Sass introduction through the main concepts - 2016
Julien Bouteloup
 
PPTX
Home business automated marketing system
Gert Bruhn
 
PPTX
волкова ю.а.
kdnz-22
 
PPTX
презентация грустілін на сайт
Александр Грустилин
 
PDF
Tecnologie e strategie progettuali per il retrofit del sistema edificio-impianto
SOLAVA
 
E150425 sustaining our_common_future
Harm Jaap Smit
 
すごいHaskellたのしくHeroku!
Haruka Nakajima
 
[사회복지사복수교육]무사고로 질주하는 IT업무환경 만들기
NpoITcenter_Kor
 
положення про-наукове-товариство
Александр Грустилин
 
Mobile Sites with Moovweb
Naseem Makiya
 
Docker やってみた
Fumihiko Nishio
 
Sass introduction through the main concepts - 2016
Julien Bouteloup
 
Home business automated marketing system
Gert Bruhn
 
волкова ю.а.
kdnz-22
 
презентация грустілін на сайт
Александр Грустилин
 
Tecnologie e strategie progettuali per il retrofit del sistema edificio-impianto
SOLAVA
 
Ad

Similar to Test automation using selenium (20)

PPT
Selenium (1)
onlinemindq
 
PPTX
Selenium
Satyam Pandey
 
PPT
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
DOC
Sel
Sandeep A R
 
PPT
Selenium Primer
gueste1e4db
 
PPT
Selenium Concepts
Swati Bansal
 
PDF
Selenium Tutorial
prad_123
 
PPT
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
DOC
Selenium Automation Using Ruby
Kumari Warsha Goel
 
PDF
Selenium by using JAVA
mahirayavarapu
 
PPT
Selenium
conect2krish
 
PDF
Interview Question & Answers for Selenium Freshers | LearningSlot
Learning Slot
 
PPTX
Selenium
Jahan Murugassan
 
PPTX
test-automation-selenium-160216124839.pptx
SyedZaeem9
 
PDF
Learn Selenium - Online Guide
bigspire
 
PPT
Selenium
Kalyan ch
 
PPT
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
 
PDF
Selenium framework faq
testslideshare_yahoo
 
DOCX
What is selenium
sachin patil
 
PPT
Selenium
Anjali Rao
 
Selenium (1)
onlinemindq
 
Selenium
Satyam Pandey
 
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Selenium Primer
gueste1e4db
 
Selenium Concepts
Swati Bansal
 
Selenium Tutorial
prad_123
 
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
Selenium Automation Using Ruby
Kumari Warsha Goel
 
Selenium by using JAVA
mahirayavarapu
 
Selenium
conect2krish
 
Interview Question & Answers for Selenium Freshers | LearningSlot
Learning Slot
 
test-automation-selenium-160216124839.pptx
SyedZaeem9
 
Learn Selenium - Online Guide
bigspire
 
Selenium
Kalyan ch
 
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
 
Selenium framework faq
testslideshare_yahoo
 
What is selenium
sachin patil
 
Selenium
Anjali Rao
 
Ad

Recently uploaded (20)

PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 

Test automation using selenium

  • 1. Softsmith Infotech 1 Test Automation Using Selenium
  • 2. Softsmith Infotech 2 Test Automation • Test automation is the use of software To set test preconditions. To control the execution of tests. To compare the actual outcomes to predicted outcomes. To report the Execution Status. • Commonly, test automation involves automating a manual process already in place that uses a formalized testing process.
  • 3. Softsmith Infotech 3 Why and When To Automate? • Frequent regression testing • Repeated test case Execution is required • User Acceptance Tests • Faster Feedback to the developers • Reduce the Human Effort • Test same application on multiple environments
  • 4. Softsmith Infotech 4 Test Automation Tools Quick Test Professional By HP Rational Functional Tester By Rational (IBM Company) Silk Test By Borland Test Complete By Automated QA QA Run (Compuware ) Watir ( Open Source) Selenium ( Open Source) Sahi (Open Source)
  • 5. Softsmith Infotech 5 Selenium • Selenium is a robust set of tools that supports rapid development of test automation for web- based applications. • Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. • Selenium operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.
  • 6. Softsmith Infotech 6 Selenium Features • Supports Cross Browser Testing. The Selenium tests can be run on multiple browsers. • Allows scripting in several languages like Java, C#, PHP and Python. • Assertion statements provide an efficient way of comparing expected and actual results. • Inbuilt reporting mechanism.
  • 7. Softsmith Infotech 7 Selenium Components • Selenium IDE • Selenium Remote Control • Selenium WebDriver • Selenium Grid
  • 8. Softsmith Infotech 8 Selenium IDE • Selenium IDE is an integrated development environment for Selenium tests. • It is implemented as a Firefox extension, and allows you to record, edit, and replay the test in firefox • Selenium IDE allows you to save tests as HTML, Java, Ruby scripts, or any other format • It allows you to automatically add assertions to all the pages. • Allows you to add selenese commands as and when required
  • 9. Softsmith Infotech 9 Selenium IDE - UI Start and Stop Recording Selenese Script Editor Selenium Log Replay Toolbar Accessor Area
  • 10. Softsmith Infotech 10 Limitations of Selenium IDE Can run the test only on Firefox No Programming login (like loops, conditional statements) can be applied Selenium IDE can execute scripts created in Selenese only. It is difficult to use Selenium IDE for checking complex test cases involving dynamic contents
  • 11. Softsmith Infotech 11 Selenium RC A solution to cross browser testing. A server, written in Java and so available on all the platforms. Acts as a proxy for web requests from them. Client libraries for many popular languages. Bundles Selenium Core and automatically loads into the browser
  • 12. Softsmith Infotech 12 How Selenium Works
  • 13. Softsmith Infotech 13 Client Drivers Enables communication with Selenium Remote Control Server. Functionality of Selenium is exposed via these drivers. Available in Ruby, Python, Java, C-Sharp …and so on. Give access to the rich features and libraries of the language, including their unit testing framework. Makes it possible to develop automated scripts in the same language as product. Which one you should use? Whatever make sense in your context. Most Popular is java and for the training we will use java
  • 16. Softsmith Infotech 16 Example 1 – Get the values from the list box and check if the value “HTML” is present in it Implementation Steps 1) First get the values from the list box 2) To get the values from the list box or any other HTML element we need to know its Xpath. (use Xpath checker) 3) The values taken from the list box are stored in a variable. 4) Use the indexOf method to find if “HTML” is present in the extracted variable.
  • 17. Softsmith Infotech 17 Screen Shot of the Example Script Xpath Locator
  • 18. Softsmith Infotech 18 Selenium-Grid Selenium-Grid allows the Selenium-RC solution to scale for test suites or test suites to be run in multiple environments. • With Selenium-Grid multiple instances of Selenium-RC are running on various operating system and browser configurations, each of these when launching register with a hub. When tests are sent to the hub they are then redirected to an available Selenium-RC, which will launch the browser and run the test. • This allows for running tests in parallel, with the entire test suite theoretically taking only as long to run as the longest individual test.
  • 20. Best practices • Use Selenium to verify workflow and session • Don't put Selenium tests in your main development build – run them overnight • Have dedicated machines that run tests • DON'T THINK OF THIS AS A REPLACEMENT FOR EXPLORATORY TESTING!!!
  • 21. Links • http://gojko.net • http://www.openqa.org • http://www.solutionsiq.com/agile2008/agile-2008- domain.php • http://storytestiq.solutionsiq.com • http://www.cubictest.com • http://fitnesse.info/webtest