SlideShare a Scribd company logo
Copyright 2015 IT Professional Academy 1
Automation (Selenium)
Testing Course
WELCOME
Copyright 2015 IT Professional Academy 2
About IT Professional Academy
•Team of Highly Skilled Trainer with work Exp of 7+Y.
•Expertise in areas like Software Testing, Big Data,
Linux-Unix, SAP BI as well as Software Development.
•Provides both Classroom and Online Classes.
•Training centers across multiple cities.
•Provides Job Assistance, Interview preparation, Mock
Interviews, Resume Preparation.
Copyright 2015 IT Professional Academy 3
Salient Features:
Copyright 2015 IT Professional Academy 4
About Trainer:
Exp: 7+ Y in Automation Testing
Technical Expertise:
Selenium, QTP, Mobile Automation
Batch Intro.
Copyright 2015 IT Professional Academy 5
Demo Agenda
•Course Content
•Introduction to Software Testing
•Introduction to Automation Testing
•Introduction to Selenium World
•Introduction to HTML
•Introduction to Objects and Methods.
•Introduction to Selenium IDE
•Record and Play Back in Selenium IDE
Copyright 2015 IT Professional Academy 6
Course Content
•Introduction to Automation Testing
•Introduction to Selenium
•Selenium Components
•Configuration Of IDE and Dev Scripts
•Introduction to Eclipse and Junit
•Selenium Web Driver
•ValidationsAssertions
•Advance Interactions
•Framework Development
•Data Driven Testing
•TestNG Framework
•Selenium Grid
http://www.itprofessionalacademy.in/selenium.php
Copyright 2015 IT Professional Academy 7
Batch Expectations
What are your Expectations with
this course?
Copyright 2015 IT Professional Academy 8
Introduction To Software Testing
•Purpose of Software Testing: To get Quality
Product with out exceeding the set Cost.
Live Example: Bank Lost $10000k in a month
due to a defect.
•Methodologies in Testing: Water fall Vs Agile
•Software testing Life Cycle.
Copyright 2015 IT Professional Academy 9
Software Testing: Water Fall Model
Copyright 2015 IT Professional Academy 10
Agile: Focus on MVP
Copyright 2015 IT Professional Academy 11
Testing Pyramid: Agile
Copyright 2015 IT Professional Academy 12
Testing Pyramid: Agile
•As testing is mostly done at the bottom,
Developer and Tester should Speak the Same
language.
•Ability of the tool for integration with the
Unit tests.
•And Selenium has that ability.
•Minimum at the top, most at the bottom.
Selenium works well with the approach.
Copyright 2015 IT Professional Academy 13
Introduction To Automation Testing
“Automation is the use of tools and strategies
that reduce human involvement or
interaction in repetitive or redundant tasks.”
Copyright 2015 IT Professional Academy 14
Need for Automation Testing?
Bottom Line:
“So that machine works while you sleep so
as to save
TIME
&
MONEY.
Budget is the Driving Factor for all automation
efforts.
Copyright 2015 IT Professional Academy 15
Need for Automation Testing?
ROI Example:
ROI = Benefit/Cost
Simple Rule: If Number of Automation
Tester is more than Number of Manual
Tester then ROI is not as Achieved.
Copyright 2015 IT Professional Academy 16
Automation ROI
Copyright 2015 IT Professional Academy 17
Before you Automate..
Ask two questions:
1. Shall you Automate?
Should get some value out of it.
“Automating Flow which will only be used once should not be
automated. Having said that, automating a flow which will be
used only once but is important and not possible manually;
should be automated.”
2. Can you Automate?
Check Automation feasibility.
“Before committing, always check if flow or AUT is feasible to
automate. Do not false commit.”
Copyright 2015 IT Professional Academy 18
Copyright 2015 IT Professional Academy 19
Advantages & Disadvantages of
Automation Testing
Advantages Disadvantages
Saves Time High Investment in Tool and training
Cost Reduction Test Coverage
Reliable: Eliminating human error High man power requirement for test
preparations.
Reusable
Better Quality Software
Copyright 2015 IT Professional Academy 20
Criteria For Automation Test Tool
Scope
Ease of Integration
Compatibility
Performance
Types of tests
Maintainability
Affordability
Copyright 2015 IT Professional Academy 21
QTP Vs Selenium-1
QTP: It is commercial tool and hence it requires a license is expensive
Selenium: Its an open source tool hence it does not require license and
is free
QTP: It is used for testing client-server applications. It can test web-
based as well as desktop applications
Selenium: Using Selenium only web applications can be tested
QTP: QTP tests can only be developed in QTP IDE
Selenium: Selenium has the option of using wide range of IDEs like
Visual Studio, Eclipse, Netbeans
QTP: HP UFT only supports VB script
Selenium: Selenium supports JAVA, .NET, Ruby, Perl, PHP, and many
other programming languages
Copyright 2015 IT Professional Academy 22
QTP Vs Selenium-2
QTP: HP UFT comes with built in object repository. Object repository
development and maintenance is quite easy in HP ALM
Selenium: Selenium dose not have such built in object repository, but
object can be managed by using UI element user extension
QTP: HP UFT integrates with test management tool like HP Quality
Center
Selenium: There is no such tool that integrates with Selenium
QTP: All types of dialog box is supported by it
Selenium: It supports dialog box partially
QTP: It supports different environments like SAP, Oracle, .NET but
user need to purchase add-on license for them
Selenium: It supports addition of plug-ins to include features that are
not provided by core Selenium
Copyright 2015 IT Professional Academy 23
QTP Vs Selenium-3
QTP: Automation testing is expensive due to licensing cost
Selenium: Web automation testing with Selenium incurs less cost
QTP: HP QTP offers very good technical support
Selenium: It has no official support, since it is an open source
QTP: HP QTP supports only VBScript . Hence Object Oriented Approach
to Test Automation becomes challenging
Selenium: Selenium supports mature Object Oriented Language like
Java
QTP: HP QTP is more user friendly and scripts are developed quickly.
Selenium: It is a low level tool with less functionality. Script requires
more time to develop and maintain
QTP: Backward compatibility is powerful. Latest version of HP ALM
supports code that was developed 5 years back
Selenium: With new Selenium release the API changes. So Test Scripts
need to be updated
Copyright 2015 IT Professional Academy 24
QTP Vs Selenium-4
In Short it is similar to Buying a Laptop
QTP: Laptop with Windows 10 and useful Applications installed.
Every thing up and Running.
Selenium: Laptop Case + Hard Disk+ Ram+ Linux CD + useful
Applications CD. But Every thing for Free and Highly
customizable Set Up.
Copyright 2015 IT Professional Academy 25
Introduction to Selenium
Selenium overview
Selenium Landscape
Selenium Components
Differences between Selenium and QTP
Modern Day Browsers
Maintainability
Affordability
Copyright 2015 IT Professional Academy 26
Introduction to Selenium
Selenium automates browsers. That’s it. What you do with that is entirely up
to you
Primarily it is for automating web applications for testing purposes, but is
certainly not limited to just that.
Selenium has the support of some of the largest browser vendors who have
taken steps to make Selenium a native part of their browser.
It is also the core technology in countless other browser automation tools,
APIs and frameworks
Selenium provides an easy to use record and playback IDE in addition to
client API which Unleash the full power of an Object oriented automation
framework.
Selenium is an open source framework which cost nothing.
Selenium has full integration with commonly used IDEs like Eclipse etc.
Copyright 2015 IT Professional Academy 27
Selenium Landscape
Supported Browser:
•Google Chrome, IE, Opera, Firefox, Safari
•Supported OS:
•Windows, Linux, iOS, Android
•Supported Languages:
Java, C#, Ruby, Python, Perl, PHP, JavaScript
Copyright 2015 IT Professional Academy 28
Modern Day Browser Usage:
Copyright 2015 IT Professional Academy 29
Selenium Components
•Selenium IDE: Mozilla Platform
•Selenium 2/ Web Driver: Java Platform
•Selenium Grid: Java Platform
•Selenium RC: Part of Selenium 2/Web Driver
Copyright 2015 IT Professional Academy 30
HTML Basics
Types of Control:
1. Text Elements
2. Text Box
3. Links
4. Table
5. Radio Group
6. Select List
7. Drop down
8. Check Box
9. Buttons
10.Hovers
11.Tooltips
Copyright 2015 IT Professional Academy 31
Object and Methods
Every thing is an Object.
All Objects has properties and methods/functions.
I am an Object:
Properties:
1. Name: Akash
2. Age: 34
3. DNA: ATCG
4. Weight: 80KG
And many more..
Actions I can
Do
1. Type(what to
type)
2. Dance(which
dance)
3. Sing(which
song)
And many more…
Copyright 2015 IT Professional Academy 32
Object and Methods
All Objects has Parent.
I am an Object:
Properties:
1. Name: Akash
2. Age: 34
3. DNA: ATCG
4. Weight: 80KG
And many more..
Actions I can
Do
1. Type(what to
type)
2. Dance(which
dance)
3. Sing(which
song)
And many more…
I am an Object:
Properties:
1. Name: Akash_Dad
2. Age: 60
3. DNA: ATCG_1
4. Weight: 75KG
And many more..
Actions I can
Do
1. Read(what to
type)
And many more…
Copyright 2015 IT Professional Academy 33
Object and Methods
<input id="gs_htif0" class="gsfi" disabled="" autocomplete="off" aria-
hidden="true" style="border: medium none; padding: 0px; margin: 0px;
height: auto; width: 100%; position: absolute; z-index: 1; background-color:
transparent; color: silver; transition: all 0.218s ease 0s; opacity: 0; text-align:
left; left: 0px;" dir="ltr" kl_virtual_keyboard_secure_input="on">
I am an Object:
Properties:
1. id: “gs_htifo”
2. class: “gsfi”
3. background-color:
“transparent”
and many more…
Actions I can Do
1. Type(Selenium)
2. Click
and many more..
Google
Input Box
Copyright 2015 IT Professional Academy 34
Target-Command-Value-Sync-
Verify
All interactions are the combination of :
1. Target
2. Command
3. Value
4. Sync
5. Verify
Analogy: “Paint- This Wall- With Red
Color-wait for it to Dry-Verify
Copyright 2015 IT Professional Academy 35
Selenium IDE
•The Selenium-IDE is the tool you use to
develop your Selenium test cases.
•Easy to use Firfox (only) plug in
•Record and Playback capabilities
•Context menu for UI Elements Selection
•Selenese Command reference
•Not only a time-saver, but also an excellent way
of learning Selenium Script syntax.
•Free and open source.
•Only for R&D; not a full fledged automation
FW.
Copyright 2015 IT Professional Academy 36
Selenium IDE
Copyright 2015 IT Professional Academy 37
Selenium IDE
All step are the combination of :
1. Command
2. Target
3. Value
Analogy: “Paint- This Wall- With Red Color
Copyright 2015 IT Professional Academy 38
Selenium IDE
3 Types of Commands:
1. Actions: Commands that directly
interacts with page elements.
2. Assessors: Store values to a variable.
3. Assertions: Verify if a certain command
is met.
Copyright 2015 IT Professional Academy 39
Selenium IDE
Examples:
1. Actions: Click, Type
2. Assessors: storeTitle, store
3. Assertions: assert, verify, waitForTitle
Copyright 2015 IT Professional Academy 40
Selenium IDE
How to Identify Locators:
There are multiple ways to identify an
Object or Target or Locator:
By id
By name
By XPATH
By Link Text
By CSS
By DOM
Copyright 2015 IT Professional Academy 41
Selenium IDE
HTML Representation:
<input id="payee.name" class="input" type="text" v
alue="" name="payee.name" kl_virtual_keyboard_s
ecure_input="on">Enter your Name</>
•By id = id="payee.name"
•By name = name="payee.name"
•By XPATH = //input[@id = ‘payee.name]
Or
//input[@id = ‘payee.name’ and containsText() =
‘Enter your Name’]
Copyright 2015 IT Professional Academy 42
Selenium IDE
Example By id, name, xpath:
Google Search Box: Locate by
id= gs_htif0;
name=q;
xapth=//div[@id='gs_lc0']/input
Copyright 2015 IT Professional Academy 43
Selenium IDE
Example:
Record Script
Demo Site:
http://parabank.parasoft.com/parabank/index.htm
Script1: ValidateLoginFunctionality
Script2: CheckBillPaymentFunctionality
Copyright 2015 IT Professional Academy 44
Selenium DAY 2
Hands On IDE
Copyright 2015 IT Professional Academy 45
Verify And Assert
Verify will continue execution.
Assert will halt execution in case of failues.
Copyright 2015 IT Professional Academy 46
Other Imp Commands
•type
•typeAndWait
•assertTextPresent
•assertTextNotPresent
•pause
•refresh
•waitForPageToLoad
•storeLocation
•storeTitle
•Check, uncheck
•mouseOver, mouseOut, mouseOverAndWait
•storeSelectedIndex, storeSelectedIndexes
•assignId, captureEntirePageScreenshot
•storeSelectOptions, storeValue
•Break,goBack
•verifyAlert, assertAlert.
Copyright 2015 IT Professional Academy 47
Other Imp Commands
Assert: Execution will Verify, But stops if verification
failed.
Copyright 2015 IT Professional Academy 48
StoreText and StoreTextPresent
"storeText" command is useful to store text value of page element in to variable for
future use
"storeTextPresent" command is not for storing value of any target element, but it
is useful to verify that
specified target text is available on page or not.
Copyright 2015 IT Professional Academy 49
Store and Echo
Store: Is used to Store value in a variable.
Once stored can be used across multiple tests in Run Session.
Echo: To Print the value.
Copyright 2015 IT Professional Academy 50
Clip Board Format
<tr> <td>open</td>
<td>/parabank/index.htm</td>
<td></td></tr><tr>
<td>type</td>
<td>name=username</td>
<td>john</td></tr><tr>
<td>type</td>
<td>name=password</td>
<td>demo</td></tr><tr>
<td>clickAndWait</td>
<td>css=input.button</td>
<td></td></tr><tr>
<td>storeText</td>
<td>//table[@id='accountTable'
]/tbody/tr[12]/td[2]/b</td>
<td>totalAmmount</td></tr><
tr> <td>echo</td>
<td>${totalAmmount}</td>
<td></td></tr>
After copying the Rows in the
IDE.
Copyright 2015 IT Professional Academy 51
Clip Board Format
driver.get(baseUrl +
"/parabank/index.htm");
driver.findElement(By.name("username")
).clear();
driver.findElement(By.name("username")
).sendKeys("john");
driver.findElement(By.name("password")
).clear();
driver.findElement(By.name("password")
).sendKeys("demo");
driver.findElement(By.cssSelector("input.
button")).click(); String totalAmmount
=
driver.findElement(By.xpath("//table[@i
d='accountTable']/tbody/tr[12]/td[2]/b"))
.getText();
System.out.println(totalAmmount);
After copying the Rows in the
IDE.
Copyright 2015 IT Professional Academy 52
Convert to Junit Web Driver Code
Convert to JUnitWeb Driver Code
Copyright 2015 IT Professional Academy 53
Selenium DAY 1 Ends.
Thank you.

More Related Content

What's hot (20)

PPTX
Automation Testing
AbdulImrankhan7
 
PPT
Android & iOS Automation Using Appium
Mindfire Solutions
 
PPTX
Angular overview
Thanvilahari
 
PPTX
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
 
PPTX
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
PPT
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
PPTX
Appium Presentation
OmarUsman6
 
PPTX
Mobile application testing
Softheme
 
PDF
Testing Angular
Lilia Sfaxi
 
PPTX
Appium overview
Abhishek Yadav
 
PPTX
Flutter workshop
Vishnu Suresh
 
PPTX
Automation testing on ios platform using appium
Ambreen Khan
 
PPTX
Automation With Appium
Knoldus Inc.
 
PPTX
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
PPT
Appium
Deepshikha Singh
 
PDF
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
Edureka!
 
PPTX
TestNG Framework
Levon Apreyan
 
PDF
NodeJS for Beginner
Apaichon Punopas
 
PPT
Tomcat
Venkat Pinagadi
 
PDF
Interview Question & Answers for Selenium Freshers | LearningSlot
Learning Slot
 
Automation Testing
AbdulImrankhan7
 
Android & iOS Automation Using Appium
Mindfire Solutions
 
Angular overview
Thanvilahari
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
 
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Appium Presentation
OmarUsman6
 
Mobile application testing
Softheme
 
Testing Angular
Lilia Sfaxi
 
Appium overview
Abhishek Yadav
 
Flutter workshop
Vishnu Suresh
 
Automation testing on ios platform using appium
Ambreen Khan
 
Automation With Appium
Knoldus Inc.
 
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
Edureka!
 
TestNG Framework
Levon Apreyan
 
NodeJS for Beginner
Apaichon Punopas
 
Interview Question & Answers for Selenium Freshers | LearningSlot
Learning Slot
 

Viewers also liked (20)

PPTX
Deploy and Destroy Complete Test Environments
Bas Dijkstra
 
PDF
Bdd and-testing
malcolmt
 
PPTX
Selenium basic
Dasun Eranthika
 
PPTX
BDD in Automation Testing
Scrum Breakfast Vietnam
 
PPTX
Automated Tests in Agile based on Serenity BDD - Michał Szybalski
ŁódQA
 
PPTX
Serenity BDD Workshop - 9th March 2016
vodqasg
 
PDF
Selenium
mdiliyazm
 
PPTX
Test Automation Frameworks: Assumptions, Concepts & Tools
Amit Rawat
 
KEY
Ui BDD Testing
Taras Kalapun
 
PDF
Serenity BDD - from executable specifications to living documentation
Alex Soto
 
PDF
Selenium web driver
Shobika Ramasubbarayalu
 
PPTX
Behavior Driven Development - Live Webinar
Belatrix Software
 
PDF
Serenity-BDD training
Savvycom Savvycom
 
PPTX
Selenium topic 3 -Web Driver Basics
ITProfessional Academy
 
PPTX
Basic Selenium Training
Dipesh Bhatewara
 
PPTX
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society
 
PDF
Model-based Testing: Taking BDD/ATDD to the Next Level
Bob Binder
 
PPTX
BDD testing with cucumber
Daniel Kummer
 
PPT
Behavior Driven Development (BDD) and Agile Testing
dversaci
 
PPT
BDD with JBehave and Selenium
Nikolay Vasilev
 
Deploy and Destroy Complete Test Environments
Bas Dijkstra
 
Bdd and-testing
malcolmt
 
Selenium basic
Dasun Eranthika
 
BDD in Automation Testing
Scrum Breakfast Vietnam
 
Automated Tests in Agile based on Serenity BDD - Michał Szybalski
ŁódQA
 
Serenity BDD Workshop - 9th March 2016
vodqasg
 
Selenium
mdiliyazm
 
Test Automation Frameworks: Assumptions, Concepts & Tools
Amit Rawat
 
Ui BDD Testing
Taras Kalapun
 
Serenity BDD - from executable specifications to living documentation
Alex Soto
 
Selenium web driver
Shobika Ramasubbarayalu
 
Behavior Driven Development - Live Webinar
Belatrix Software
 
Serenity-BDD training
Savvycom Savvycom
 
Selenium topic 3 -Web Driver Basics
ITProfessional Academy
 
Basic Selenium Training
Dipesh Bhatewara
 
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society
 
Model-based Testing: Taking BDD/ATDD to the Next Level
Bob Binder
 
BDD testing with cucumber
Daniel Kummer
 
Behavior Driven Development (BDD) and Agile Testing
dversaci
 
BDD with JBehave and Selenium
Nikolay Vasilev
 
Ad

Similar to Selenium topic 1- Selenium Basic (20)

PPTX
QTP Automation Testing Tutorial 1
Akash Tyagi
 
PDF
Module-1_Getting-Started_with_selenium_and_Java_basics.pdf
devika266518
 
PDF
SELENIUM or QTP Which is a Best Automation Tool for Your Business ?
JanBask Training
 
PPTX
Introduction to selenium
Khaja Moiz Uddin
 
PDF
QTP vs Selenium | Read Differences
TestingXperts
 
PPTX
Selenium – Web Browser Automation
Pakorn Weecharungsan
 
PPTX
Selenium training basics
pksbpl
 
PPTX
AUTOMATION TESTING prsentation about selenium basics and types of selenium co...
ssuser94400e
 
PPTX
Introduction to selenium
Khaja Moiz Uddin
 
PPT
Selenium
Anil Babu
 
PDF
Learn Selenium - Online Guide
bigspire
 
PPTX
Selenium Topic 2 IDE
ITProfessional Academy
 
PDF
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Edureka!
 
PPT
Selenium slide
Charlotte Charl
 
PDF
Test Automation Tool comparison – HP UFT/QTP vs. Selenium
Aspire Systems
 
PPTX
Test automation using selenium
Cynoteck Technology Solutions Private Limited
 
PDF
Selenium Online Training
Nagendra Kumar
 
PDF
Selenium presentation
P.V.G'S COET, PUNE - 09
 
PPTX
Selenium Automation
Anuradha Malalasena
 
QTP Automation Testing Tutorial 1
Akash Tyagi
 
Module-1_Getting-Started_with_selenium_and_Java_basics.pdf
devika266518
 
SELENIUM or QTP Which is a Best Automation Tool for Your Business ?
JanBask Training
 
Introduction to selenium
Khaja Moiz Uddin
 
QTP vs Selenium | Read Differences
TestingXperts
 
Selenium – Web Browser Automation
Pakorn Weecharungsan
 
Selenium training basics
pksbpl
 
AUTOMATION TESTING prsentation about selenium basics and types of selenium co...
ssuser94400e
 
Introduction to selenium
Khaja Moiz Uddin
 
Selenium
Anil Babu
 
Learn Selenium - Online Guide
bigspire
 
Selenium Topic 2 IDE
ITProfessional Academy
 
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Edureka!
 
Selenium slide
Charlotte Charl
 
Test Automation Tool comparison – HP UFT/QTP vs. Selenium
Aspire Systems
 
Test automation using selenium
Cynoteck Technology Solutions Private Limited
 
Selenium Online Training
Nagendra Kumar
 
Selenium presentation
P.V.G'S COET, PUNE - 09
 
Selenium Automation
Anuradha Malalasena
 
Ad

Recently uploaded (20)

PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PPTX
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Import Data Form Excel to Tally Services
Tally xperts
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 

Selenium topic 1- Selenium Basic

  • 1. Copyright 2015 IT Professional Academy 1 Automation (Selenium) Testing Course WELCOME
  • 2. Copyright 2015 IT Professional Academy 2 About IT Professional Academy •Team of Highly Skilled Trainer with work Exp of 7+Y. •Expertise in areas like Software Testing, Big Data, Linux-Unix, SAP BI as well as Software Development. •Provides both Classroom and Online Classes. •Training centers across multiple cities. •Provides Job Assistance, Interview preparation, Mock Interviews, Resume Preparation.
  • 3. Copyright 2015 IT Professional Academy 3 Salient Features:
  • 4. Copyright 2015 IT Professional Academy 4 About Trainer: Exp: 7+ Y in Automation Testing Technical Expertise: Selenium, QTP, Mobile Automation Batch Intro.
  • 5. Copyright 2015 IT Professional Academy 5 Demo Agenda •Course Content •Introduction to Software Testing •Introduction to Automation Testing •Introduction to Selenium World •Introduction to HTML •Introduction to Objects and Methods. •Introduction to Selenium IDE •Record and Play Back in Selenium IDE
  • 6. Copyright 2015 IT Professional Academy 6 Course Content •Introduction to Automation Testing •Introduction to Selenium •Selenium Components •Configuration Of IDE and Dev Scripts •Introduction to Eclipse and Junit •Selenium Web Driver •ValidationsAssertions •Advance Interactions •Framework Development •Data Driven Testing •TestNG Framework •Selenium Grid http://www.itprofessionalacademy.in/selenium.php
  • 7. Copyright 2015 IT Professional Academy 7 Batch Expectations What are your Expectations with this course?
  • 8. Copyright 2015 IT Professional Academy 8 Introduction To Software Testing •Purpose of Software Testing: To get Quality Product with out exceeding the set Cost. Live Example: Bank Lost $10000k in a month due to a defect. •Methodologies in Testing: Water fall Vs Agile •Software testing Life Cycle.
  • 9. Copyright 2015 IT Professional Academy 9 Software Testing: Water Fall Model
  • 10. Copyright 2015 IT Professional Academy 10 Agile: Focus on MVP
  • 11. Copyright 2015 IT Professional Academy 11 Testing Pyramid: Agile
  • 12. Copyright 2015 IT Professional Academy 12 Testing Pyramid: Agile •As testing is mostly done at the bottom, Developer and Tester should Speak the Same language. •Ability of the tool for integration with the Unit tests. •And Selenium has that ability. •Minimum at the top, most at the bottom. Selenium works well with the approach.
  • 13. Copyright 2015 IT Professional Academy 13 Introduction To Automation Testing “Automation is the use of tools and strategies that reduce human involvement or interaction in repetitive or redundant tasks.”
  • 14. Copyright 2015 IT Professional Academy 14 Need for Automation Testing? Bottom Line: “So that machine works while you sleep so as to save TIME & MONEY. Budget is the Driving Factor for all automation efforts.
  • 15. Copyright 2015 IT Professional Academy 15 Need for Automation Testing? ROI Example: ROI = Benefit/Cost Simple Rule: If Number of Automation Tester is more than Number of Manual Tester then ROI is not as Achieved.
  • 16. Copyright 2015 IT Professional Academy 16 Automation ROI
  • 17. Copyright 2015 IT Professional Academy 17 Before you Automate.. Ask two questions: 1. Shall you Automate? Should get some value out of it. “Automating Flow which will only be used once should not be automated. Having said that, automating a flow which will be used only once but is important and not possible manually; should be automated.” 2. Can you Automate? Check Automation feasibility. “Before committing, always check if flow or AUT is feasible to automate. Do not false commit.”
  • 18. Copyright 2015 IT Professional Academy 18
  • 19. Copyright 2015 IT Professional Academy 19 Advantages & Disadvantages of Automation Testing Advantages Disadvantages Saves Time High Investment in Tool and training Cost Reduction Test Coverage Reliable: Eliminating human error High man power requirement for test preparations. Reusable Better Quality Software
  • 20. Copyright 2015 IT Professional Academy 20 Criteria For Automation Test Tool Scope Ease of Integration Compatibility Performance Types of tests Maintainability Affordability
  • 21. Copyright 2015 IT Professional Academy 21 QTP Vs Selenium-1 QTP: It is commercial tool and hence it requires a license is expensive Selenium: Its an open source tool hence it does not require license and is free QTP: It is used for testing client-server applications. It can test web- based as well as desktop applications Selenium: Using Selenium only web applications can be tested QTP: QTP tests can only be developed in QTP IDE Selenium: Selenium has the option of using wide range of IDEs like Visual Studio, Eclipse, Netbeans QTP: HP UFT only supports VB script Selenium: Selenium supports JAVA, .NET, Ruby, Perl, PHP, and many other programming languages
  • 22. Copyright 2015 IT Professional Academy 22 QTP Vs Selenium-2 QTP: HP UFT comes with built in object repository. Object repository development and maintenance is quite easy in HP ALM Selenium: Selenium dose not have such built in object repository, but object can be managed by using UI element user extension QTP: HP UFT integrates with test management tool like HP Quality Center Selenium: There is no such tool that integrates with Selenium QTP: All types of dialog box is supported by it Selenium: It supports dialog box partially QTP: It supports different environments like SAP, Oracle, .NET but user need to purchase add-on license for them Selenium: It supports addition of plug-ins to include features that are not provided by core Selenium
  • 23. Copyright 2015 IT Professional Academy 23 QTP Vs Selenium-3 QTP: Automation testing is expensive due to licensing cost Selenium: Web automation testing with Selenium incurs less cost QTP: HP QTP offers very good technical support Selenium: It has no official support, since it is an open source QTP: HP QTP supports only VBScript . Hence Object Oriented Approach to Test Automation becomes challenging Selenium: Selenium supports mature Object Oriented Language like Java QTP: HP QTP is more user friendly and scripts are developed quickly. Selenium: It is a low level tool with less functionality. Script requires more time to develop and maintain QTP: Backward compatibility is powerful. Latest version of HP ALM supports code that was developed 5 years back Selenium: With new Selenium release the API changes. So Test Scripts need to be updated
  • 24. Copyright 2015 IT Professional Academy 24 QTP Vs Selenium-4 In Short it is similar to Buying a Laptop QTP: Laptop with Windows 10 and useful Applications installed. Every thing up and Running. Selenium: Laptop Case + Hard Disk+ Ram+ Linux CD + useful Applications CD. But Every thing for Free and Highly customizable Set Up.
  • 25. Copyright 2015 IT Professional Academy 25 Introduction to Selenium Selenium overview Selenium Landscape Selenium Components Differences between Selenium and QTP Modern Day Browsers Maintainability Affordability
  • 26. Copyright 2015 IT Professional Academy 26 Introduction to Selenium Selenium automates browsers. That’s it. What you do with that is entirely up to you Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Selenium has the support of some of the largest browser vendors who have taken steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks Selenium provides an easy to use record and playback IDE in addition to client API which Unleash the full power of an Object oriented automation framework. Selenium is an open source framework which cost nothing. Selenium has full integration with commonly used IDEs like Eclipse etc.
  • 27. Copyright 2015 IT Professional Academy 27 Selenium Landscape Supported Browser: •Google Chrome, IE, Opera, Firefox, Safari •Supported OS: •Windows, Linux, iOS, Android •Supported Languages: Java, C#, Ruby, Python, Perl, PHP, JavaScript
  • 28. Copyright 2015 IT Professional Academy 28 Modern Day Browser Usage:
  • 29. Copyright 2015 IT Professional Academy 29 Selenium Components •Selenium IDE: Mozilla Platform •Selenium 2/ Web Driver: Java Platform •Selenium Grid: Java Platform •Selenium RC: Part of Selenium 2/Web Driver
  • 30. Copyright 2015 IT Professional Academy 30 HTML Basics Types of Control: 1. Text Elements 2. Text Box 3. Links 4. Table 5. Radio Group 6. Select List 7. Drop down 8. Check Box 9. Buttons 10.Hovers 11.Tooltips
  • 31. Copyright 2015 IT Professional Academy 31 Object and Methods Every thing is an Object. All Objects has properties and methods/functions. I am an Object: Properties: 1. Name: Akash 2. Age: 34 3. DNA: ATCG 4. Weight: 80KG And many more.. Actions I can Do 1. Type(what to type) 2. Dance(which dance) 3. Sing(which song) And many more…
  • 32. Copyright 2015 IT Professional Academy 32 Object and Methods All Objects has Parent. I am an Object: Properties: 1. Name: Akash 2. Age: 34 3. DNA: ATCG 4. Weight: 80KG And many more.. Actions I can Do 1. Type(what to type) 2. Dance(which dance) 3. Sing(which song) And many more… I am an Object: Properties: 1. Name: Akash_Dad 2. Age: 60 3. DNA: ATCG_1 4. Weight: 75KG And many more.. Actions I can Do 1. Read(what to type) And many more…
  • 33. Copyright 2015 IT Professional Academy 33 Object and Methods <input id="gs_htif0" class="gsfi" disabled="" autocomplete="off" aria- hidden="true" style="border: medium none; padding: 0px; margin: 0px; height: auto; width: 100%; position: absolute; z-index: 1; background-color: transparent; color: silver; transition: all 0.218s ease 0s; opacity: 0; text-align: left; left: 0px;" dir="ltr" kl_virtual_keyboard_secure_input="on"> I am an Object: Properties: 1. id: “gs_htifo” 2. class: “gsfi” 3. background-color: “transparent” and many more… Actions I can Do 1. Type(Selenium) 2. Click and many more.. Google Input Box
  • 34. Copyright 2015 IT Professional Academy 34 Target-Command-Value-Sync- Verify All interactions are the combination of : 1. Target 2. Command 3. Value 4. Sync 5. Verify Analogy: “Paint- This Wall- With Red Color-wait for it to Dry-Verify
  • 35. Copyright 2015 IT Professional Academy 35 Selenium IDE •The Selenium-IDE is the tool you use to develop your Selenium test cases. •Easy to use Firfox (only) plug in •Record and Playback capabilities •Context menu for UI Elements Selection •Selenese Command reference •Not only a time-saver, but also an excellent way of learning Selenium Script syntax. •Free and open source. •Only for R&D; not a full fledged automation FW.
  • 36. Copyright 2015 IT Professional Academy 36 Selenium IDE
  • 37. Copyright 2015 IT Professional Academy 37 Selenium IDE All step are the combination of : 1. Command 2. Target 3. Value Analogy: “Paint- This Wall- With Red Color
  • 38. Copyright 2015 IT Professional Academy 38 Selenium IDE 3 Types of Commands: 1. Actions: Commands that directly interacts with page elements. 2. Assessors: Store values to a variable. 3. Assertions: Verify if a certain command is met.
  • 39. Copyright 2015 IT Professional Academy 39 Selenium IDE Examples: 1. Actions: Click, Type 2. Assessors: storeTitle, store 3. Assertions: assert, verify, waitForTitle
  • 40. Copyright 2015 IT Professional Academy 40 Selenium IDE How to Identify Locators: There are multiple ways to identify an Object or Target or Locator: By id By name By XPATH By Link Text By CSS By DOM
  • 41. Copyright 2015 IT Professional Academy 41 Selenium IDE HTML Representation: <input id="payee.name" class="input" type="text" v alue="" name="payee.name" kl_virtual_keyboard_s ecure_input="on">Enter your Name</> •By id = id="payee.name" •By name = name="payee.name" •By XPATH = //input[@id = ‘payee.name] Or //input[@id = ‘payee.name’ and containsText() = ‘Enter your Name’]
  • 42. Copyright 2015 IT Professional Academy 42 Selenium IDE Example By id, name, xpath: Google Search Box: Locate by id= gs_htif0; name=q; xapth=//div[@id='gs_lc0']/input
  • 43. Copyright 2015 IT Professional Academy 43 Selenium IDE Example: Record Script Demo Site: http://parabank.parasoft.com/parabank/index.htm Script1: ValidateLoginFunctionality Script2: CheckBillPaymentFunctionality
  • 44. Copyright 2015 IT Professional Academy 44 Selenium DAY 2 Hands On IDE
  • 45. Copyright 2015 IT Professional Academy 45 Verify And Assert Verify will continue execution. Assert will halt execution in case of failues.
  • 46. Copyright 2015 IT Professional Academy 46 Other Imp Commands •type •typeAndWait •assertTextPresent •assertTextNotPresent •pause •refresh •waitForPageToLoad •storeLocation •storeTitle •Check, uncheck •mouseOver, mouseOut, mouseOverAndWait •storeSelectedIndex, storeSelectedIndexes •assignId, captureEntirePageScreenshot •storeSelectOptions, storeValue •Break,goBack •verifyAlert, assertAlert.
  • 47. Copyright 2015 IT Professional Academy 47 Other Imp Commands Assert: Execution will Verify, But stops if verification failed.
  • 48. Copyright 2015 IT Professional Academy 48 StoreText and StoreTextPresent "storeText" command is useful to store text value of page element in to variable for future use "storeTextPresent" command is not for storing value of any target element, but it is useful to verify that specified target text is available on page or not.
  • 49. Copyright 2015 IT Professional Academy 49 Store and Echo Store: Is used to Store value in a variable. Once stored can be used across multiple tests in Run Session. Echo: To Print the value.
  • 50. Copyright 2015 IT Professional Academy 50 Clip Board Format <tr> <td>open</td> <td>/parabank/index.htm</td> <td></td></tr><tr> <td>type</td> <td>name=username</td> <td>john</td></tr><tr> <td>type</td> <td>name=password</td> <td>demo</td></tr><tr> <td>clickAndWait</td> <td>css=input.button</td> <td></td></tr><tr> <td>storeText</td> <td>//table[@id='accountTable' ]/tbody/tr[12]/td[2]/b</td> <td>totalAmmount</td></tr>< tr> <td>echo</td> <td>${totalAmmount}</td> <td></td></tr> After copying the Rows in the IDE.
  • 51. Copyright 2015 IT Professional Academy 51 Clip Board Format driver.get(baseUrl + "/parabank/index.htm"); driver.findElement(By.name("username") ).clear(); driver.findElement(By.name("username") ).sendKeys("john"); driver.findElement(By.name("password") ).clear(); driver.findElement(By.name("password") ).sendKeys("demo"); driver.findElement(By.cssSelector("input. button")).click(); String totalAmmount = driver.findElement(By.xpath("//table[@i d='accountTable']/tbody/tr[12]/td[2]/b")) .getText(); System.out.println(totalAmmount); After copying the Rows in the IDE.
  • 52. Copyright 2015 IT Professional Academy 52 Convert to Junit Web Driver Code Convert to JUnitWeb Driver Code
  • 53. Copyright 2015 IT Professional Academy 53 Selenium DAY 1 Ends. Thank you.

Editor's Notes

  • #7: http://www.itprofessionalacademy.in/selenium.php
  • #17: If green line is not getting constant, ROI will never be achieved.
  • #19: But this is water fall. Old Approach.
  • #36: Minimum at the top, most at the bottom. Selenium works well with the approach.
  • #37: Minimum at the top, most at the bottom. Selenium works well with the approach.
  • #40: http://parabank.parasoft.com/parabank/index.htm
  • #41: http://parabank.parasoft.com/parabank/index.htm
  • #42: http://parabank.parasoft.com/parabank/index.htm
  • #43: http://parabank.parasoft.com/parabank/index.htm