SlideShare a Scribd company logo
1 of 73
Download to read offline
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Data Science
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Automation
Using Selenium
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Introduction
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Participant’s Introduction
❑ Name
❑ Professional experience
❑ Current role
❑ What you know about Tableau
❑ What you expect from the session
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Agenda
✓ Why Automation
✓ Software Testing
✓ Types of Software's
✓ STE vs. SDET
✓ QTP vs. Selenium
✓ Introduction to Selenium
✓ Selenium Components
✓ Why Selenium Web Driver
✓ Disadvantages with Selenium
✓ Selenium with Java Overview
✓ Quiz
✓ Hands-On Lab
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Getting Started with Selenium
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Why Automation
Test automation involves automating a manual process
already in place that uses a formalized testing process.
Converting manual test cases into test Script
• 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
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Automation Testing
• Execute(Run) Test Script on Sprint(software) called
Automation Testing
• Prepare Test Scenarios Test Cases Test Data into Test
Script Using {Testing Tools Selenium ,QTP . .} called
Test Automation
• Prepare Test Scenarios Test Cases Test Data
Study User Stories {Requirements}
SDET{Software Development Engineer in Testing}
Manual Testing
• Run TS,TC with TD on Sprint{Software}
Operating Mouse & Keyboard
• Prepare Test Scenarios Test Cases Test Data
• Study User Stories {Requirements}
• STE{Software Test Engineer}
Software Testing
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Types of Software
• Developed Based on
Specific Customer
Requirements
• Customer Should Pay
• Customer is Owner
• Example SBI, HDFC,
AbhiBus
• Developed Based on
Market Requirements
• Company Invest Money
• Company is Owner
• Example Operating
System , Team viewer ,
Skype
Software
Project Based
Software
Product Based
Software
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Need for Automation
Software Testing
Functional Testing
Performance Testing
Other Non Functional Testing's
Manual/Automation
Manual/Automation
Manual/Automation
Manual
Advantage
Time Solving
Decreases Cost and Complexity
It takes Less Time
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Software Testing
Functional
Testing
• GUI Testing
• Input Domain
Testing
• Error Handling
Testing
• Manipulation Testing
• Database Testing
• Data Volume Testing
• Recovery Testing
• Integration Testing
Non
Functional
Testing
• Usability Testing
• Compatibility Testing
• Configuration
Testing
• Performance Testing
• Security Testing
• Multilanguity Testing
• Parallel Testing
• Compliance Testing
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Types of Software's
1-Tier Software
2-Tier Software
3-Tier Software
n-Tier Software
Native/Hybrid App
Site in Mobile
Description
Window based Software
Window based Software
Web based Software
Web Services
Not Required Mobile Data
Required Mobile Data
Example
Screens, Notepad, Calculator
Screens with Database, Projects
without Server
Website, WebPages, WebServer,
Database, Gmail
Web Services, Web Server,
Database, Cricket Score
Offline Apps, Games
Whatsapp
Software Types
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
QTP vs Selenium
•
•
QTP
• In recent economic crisis, software
companies are planning for cost
reduction and efficient productivity.
• QTP is losing its market because of the
following limitations:
• Runs only in Windows environments.
• Cannot test with all browser types and
versions.
• Limited to smaller organizations/
testing teams.
• High licensing and add-inns costs.
• Slow in execution when compared
with open source tools.
Selenium
• Selenium is a robust set of tools that
supports rapid development of test
automation for web-based applications
• Supports Cross Browser Testing.The
Selenium tests can be run on multiple
browsers and also supports all
environment
• Allows scripting in several languages
like Java, C#,PHP and Python.
• Open Source(Free of cost)
• Assertion statements provide an
efficient way of comparing expected
and actual results.
• Inbuilt reporting mechanism.
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Selenium
Jason Huggins and team from ThoughtWorks Inc.
developed the testing tool in 2004
Huggins joked about competitor HP Mercury Tools saying
cure mercury poisoning by taking Selenium supplements.
Hence the name “Selenium”
Works anywhere JavaScript is supported
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Primarily, Selenium was created by Jason Huggins in 2004
Created JavaScript
JavaScriptTestRunner
Selenium Core
Named it as Later re-named as
Selenium
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Selenium Components
Selenium is not just a single tool , suite of tool’s.
It has 4 Components:
Shinya Kasatani
Selenium Integrated
Development Environment (IDE)
Paul Hammant
Selenium Remote Control (RC)
Simon Stewart
Selenium Web Driver
Patrick Lightbody
Selenium Grid
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Selenium
In 2006 Selenium Web Driver was launched at Google.
In 2008 Whole Selenium Team Decided to Merge Selenium Web Driver with Selenium RC in order to form
More Powerful tool called Selenium 2.0
Selenium
IDE{Limited Use}
Selenium RC
{Remote Control}
Out Dated Using
only for
Maintenance
Projects
Selenium Web
Driver {Successor
of Selenium RC}
Selenium
Grid{Only for
Parallel Test
Execution ,not for
Test Design}
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Selenium Suite
Selenium
IDE
Selenium RC
Selenium
Web Driver
Selenium
Grid
Selenium2
Selenium3
Merged
Enhanced
Simon Stewart Patrick Lightbody
Paul Hammant
Shinya Kasatani
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Selenium IDE
The IDE will be opened
Now perform the operations on the application as you are testing the
application
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
Go To Tools Selenium IDE
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Selenium RC
Selenium 1.0
• 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
• Once the Scripts are recorded add assertions where ever
required
• Now format the Selenese test into the language of your choice.
• Please refer to the Image
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Selenium Grid
a. Selenium Grid is a part of the Selenium Suite
b. Selenium Grid has a Hub and Node Architecture.
c. To Run your tests against different browsers,
operating systems, and machines all at the same time
d. If you set up Selenium Grid to run, say, 4 tests at a
time, then you would be able to finish the whole suite
around 4 times faster.
e. It support both Selenium RC and Web Driver scripts.
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Selenium WebDriver
Selenium WebDriver
Architecture
Selenium 2.0
WebDriver is designed to providing a simpler and
uniformed programming interface
Same WebDriver script runs for different
platforms
Support multiple programming language:
• Java, C#, Python, Ruby, PHP, Perl…
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Why Selenium WebDriver
• We can Freely
Download & Use
• We can do
Enhancements
Selenium is
Open Source
Software
• MS Windows
• Linux
• Macintosh
• Apple OX
Selenium
Supports
different
Operating
Environments
• Google Chrome
• Linux
• Mozilla Firefox
• IE
• Safari
• Opera…….
Selenium
Supports
different
Browser
Environments
• Web Based
• Mobile Based –
Applications
Having Web
Forms
Selenium
Supports
different
Application
Environments
• Java
• C#
• Python
• JavaScript (Node)
• Ruby
Selenium
Supports
different
Programming
Environments
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Disadvantages with Selenium
❑ It doesn’t generate detailed Test Reports
❑ No reliable support
❑ Difficult to setup environment
❑ Limited support for Image based testing
❑ No other tool integration for test management
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Selenium with Java
Why we choose Java ? why don’t we go for Other
Programming Languages since Selenium has Compatibility
with Other Programming Languages ?
❑ Selenium written in Java
❑ Knowledge sharing is very easy , as Majority of
Selenium Testers (nearly 77%) using Java,.
❑ Java is Platform Independent (can use on Any
Operating System)
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
JDK
Any OS
Eclipse IDE
Java Project
Package
Class
Main()
{
----
-----
}
Selenium Web Driver Jars
Pages in IE
Pages in Chrome
Pages in Firefox
Web
Server
DB
Chrome Driver
Tester Computer
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Java Environment Setup
Download Java
(JDK) Software and
Install
Set Environment
Variable (Path
variable)
Download Eclipse
IDE and Extract.
• Create Java project
• Create Java Package
• Create Java Class /Program
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Establish Test Environment
JDK SETUP STEPS
Check Computer
OS bit Size
Ex: 32bit or 64 bit?
32 bit
(windo
ws x86)
64 bit
(windo
ws x64)
Now follow below
Navigation to
Download JDK8
w.r.t bit size of OS
Launch Google
Browser.
Enter JDK8 Download
Click Search
goto Oracle.com.site
http://www.oracle.c
om/technetwork/jav
a/javase/downloads
/jdk8-downloads-
2133151.html
Java SE Development
Kit
Accept License
Agreement RADIO
BUTTON
Click JDK Link wrt bit
size of OS
ex: JDK x86 for 32bit
JDK x64 fro 64bit OS
Paste that download
in your selected
folder
Create Personal
Folder in your
selected Drive
Paste that
download into
your Personal
Folder without
Space EXAMPLE:
Intelipaat
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Establish Test Environment
Configuring Computer with Java
Open your Personal
Folder and Double Click
on Download Enter
JDK8 Download
Click next until Finish
After Installing check
Java Folder in your C
drive-programfiles-
javafolder-jdk
Goto JDK folder in
C:ProgramfilesJavaJ
DK1.8.0.
Copy Path of JDK
Folder
Right Click on
MyComputer Icon
Go to Properties
Advanced System
Settings
Environment Variables
Click New for System
Variables
Variable name:
JAVA_HOME
Variable value:
c:programfielsjavajd
k18.0_20
OK Cancel
Click OK
Goto Path Variable-
>Select Path->Click Edit
->Without Distrubing
Existing Path
Paste
c:programfielsjavajd
k18.0_20bin;
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Establish Test Environment
To check JDK installed Properly or not?
Open Command
prompt
Type
cmd
in Start search
Enter Following
Commands
• C:> D:
• D:> java
• D:> javac
Able to see
www.oracle.com
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Establish Test Environment
ECLIPSE IDE Setup
Goto google Click next
until Finish
Enter Eclipse Juno SR2
download
Click Search.
Go to Eclipse.org.site
Go to windows 32 bit or
64 bit
Click Download
Paste that download in
Personal folder
Extract that download in
Personal Folder
Open Eclipse Folder after
Extract
You will find Eclipse Icon Right click on Icon
Select Desktop(Create
Short Cut)
Eclipse Ide will be visible
on Desktop
Double click on Eclipse
Icon
Then you will find for first
time Workspace Option
Select your Personal
Folder
To change workspace
folder
Goto file menu in Eclipse
Switch to Workspace
Other
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Establish Test Environment
JAVA PROJECT CREATION IN ECLIPSE
Eclipse
File
New
Select Option Other Choose Java Project
New Java Project
Project Name
(Lowercase Only)
Place Tick on Default
Location
Click Finish
Project Created
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Establish Test Environment
JAVA PROJECT CREATION IN ECLIPSE
Note:-
After Completion of Java Project Creation in Eclipse.
Check JRE Version(Run Time Version)
Right Click on Java Project
Properties
Java Compiler
Change to Latest Version(1.8)
Java Build Path
Libraries
Remove Lower Version JRE System-> Library
Click(Add Library)
Select JRE System Library as Latest(1.8)
Click Finish
Click Ok
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Establish Test Environment
JAVA PACKAGE CREATION
Right Click on Java Project File
New
Package
Enter name to Package(Lowercase)
Click Finish
CLASS CREATION IN JAVA PACKAGE
To Create a Class with main Method
Right Click on Package
New
Class
Enter Name to Class in Name Blank
Class name Starts with Uppercase(Ex: Test)
Note: Do Tick mark on Public Static void
main(stringargs[]) Click Finish
Select main method option
Click Finish
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Prerequisite
Java for Test Automation using
Selenium Core Java is sufficient,
Advanced Java is not required.
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Core Java
Java Fundamentals
Data Types and Variables
Operators
Decision Making
Arrays
Loops
Java OOPS Concepts
Classes and Objects
Class Constructors
String Class
Core Java
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Object
State
Variables
Dog Breed ,Color
Behavior
Methods
Barking, Running
Object is Instance of Class
Object is a Collection of Methods and Variables
Classes are the templates for
the creation of objects
Class
Dog
Note1:-
The difference between a class
and an object is that class are
created
when the program is created
but the objects are created at
the run time.
Note2:-
A method can produce some value
or return some value. If the method is
returning some value then the type of value
that a method can provide (or return) is
written on the left side of the method name.
But when it does not , then method is to be
declared as void method.
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Dog(Class)
Object1(Tommy)
Object1(Honey)
Object1(Jimmy)
Breed
Lifespan
Color
Barking
Running
State(Variables)
Breed Labrador
Lifespan 7 Years
State(Variables)
Breed German Sheppard
Lifespan 9 Years
State(Variables)
Breed Rot wheeler
Lifespan 7 Years
Behavior(Methods)
clean-cut head
Friendly
powerful jaws
Swimmers
Bomb Detectors
Behavior(Methods)
barkers.
Digging
Chewing
Behavior(Methods)
fearless expression
calm and confident
aloof toward strangers
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Fundamental Concepts
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
1. Documentation Section
2. Package declaration
Statement
3. Import Statements
Structure of Program in Java
We import built in and User defined libraries
using import keyword
Ex:
import java.io.Console;
import java.lang.*;
import - It is a Java keyword to import Libraries.
java –Project
io –Package
Console – Class
lang.*; - import all classes from lang package.
Ex: package xyza;
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
public class Sample {
}
public - Access Modifier
class - Java keyword to declare a class
Sample - it is the Class name (You can use any meaningful name)
4. Class declaration
Statement
Structure of Program in Java
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Structure of Program in Java
(* It is the mandatory statement in every Java program)
public static void main (String [] args) {
}
public - Access Modifier
static - Non-Access Modifier (use main method without invoking any object)
void - Returns nothing
main- method name
5. main Method (Java Program execution starts from main method)
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Structure of Program in Java
Structure of Program in Java
We can Declare Variables and Constants.
Other Statements
System.out.println(“Automation Using Selenium");
System - Class (Pre-defined)
out - Object
println - method
“Automation Using Selenium" - Message
5. Declarations
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Structure of Program in Java
-Decision making
-Loop
-Method blocks (method declaration before the main method, but we access methods
after main method)
etc...
-------------------------------------
> Every normal statement/step ends with semi colon
> Every code block enclosed with {}
7. Code Blocks
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
First Program in Java
//Documentation
package xyza;
import java.io.Console;
import java.lang.*;
public class Sample {
//Create a Method(User defined)
public int multiply(int a, int b, int c){ //multiply is the
method name
//a,b,c are Integer Data Types
int result = a * b * c; //Multiplication Operation
return result;
}
public static void main (String []
args){
// This is a sample Program
int a = 10, b, c; //Variables
Declaration
b = 20; c = 30; //Initialization
final int money =100;//Constant
Declaration
System.out.println("Addition of a, b is "
+ (a + b));//Addition of a, b is 30
System.out.println(money);//100
System.out.println(c);//30
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
//Decision Making
if (a > b){
System.out.println("A is a Big Number");
}
else
{
System.out.println("B is a Big Nuber");
}
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
//Loop
for (int d=1; d <=10; d++){
System.out.println(d);
}
//Create Object and access Methods
Sample obj = new Sample();
int x = obj.multiply(10, 25, 50);
System.out.println(x);
}
}
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Comments in Java
Comments are English words used for Code documentation.
Purpose of Comments
a) To make the code Readable
b) To make the code disable from execution
Use // for Single line comment
Use /*
Usage of Comments in Test Automation
a) To write Test Case header
b) To write Method header
c) To explain complex logic etc...
*/ for multiple lines comment
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Data Types
Primitive Data Types
Non-Primitive Data
Types/Reference DT
What is Data Type?
A data type indicates the type of data the
variable can represents, such as integer,
floating point numbers, character,
Boolean or an alphanumeric string.
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Primitive Data Types
Primitive Data
Type
Integer Types Relational Types Characters Conditional
1. byte (8 bits)
byte a =10;
2. short (16 bits)
short a =10000;
3. integer(32 bits)
int a = 100000;
4. long (64 bits)
long a
=100000000000000;
5. float (32 bits)
float a = 1.23;
6. double (64 bits)
double a
=123.345654322;
7. character
char a ='Z'
8. Boolean
boolean a = true;
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Non-Primitive Data Types
Non-Primitive Data
Type
Objects Array
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Operators in Java
Operators are used to perform Mathematical, Comparison and Logical operations.
Categories of Operators:
S.No Operator Name Operator Category
a. Arithmetic Operators - + * / % ++ --
b. Relational Operators > < >= <= == !=
c. Bitwise Operators & | ^ >> >>>
d. Logical Operators && || & | ! ^
e. Assignment Operators =
f. Miscellaneous Operators += -= *= /= %=
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Flow Control Statements
Conditional Statements
If Statement
Switch Statement
Loop Statements
For loop
While loop
Do While loop
Enhanced For loop (arrays)
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Conditional Statements
Types
of
Condition
Single Condition (Positive/Negative)
(1)
Compound Condition
(2)
Nested condition
(3,4,5)
•Execute a block of statements when condition is True.
•Execute a block of statements when condition is True,
otherwise execute another block of statements.
•Decide among several alternates (Else If)
•Execute a block of statements when more than one
condition is True.(nested If)
•Decide among several alternates (Switch statement)
Usage of Conditional Statements
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Arrays in Java
Definition:
Array is a collection of similar type of elements.
• In Java, Array is an Object that contains elements of similar data types.
• Java Array is index based, index starts from Zero.
• The length of an Array is established when the Array is created and Array length is fixed.
• Each item in an Array is called an Element.
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Methods in Java
Basically Methods are Two types:
Definition:
Methods are also known as
Functions.
• In structured programming (Ex: C
Language) we use Functions(Built-in and
User defined),
• In Object oriented programming we use
Methods (Built-in and User defined).
Built in Methods
Number Methods
Character methods
String Methods
Date & Time Methods
etc...
User defined Methods
Method with
returning value
Method without
returning any value.
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Exception handling In Java
Definition:
In Computer programming, Exception is an abnormal
condition.
• An exception is an event that occurs during the execution of a program that disturbs the normal flow
of instructions.
• The Run-time errors so that normal flow of the program can be maintained exception handling in
java is one of the powerful mechanism to handle
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Object Oriented Programming System
Concepts
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Object Oriented Programming System Concepts
Four Fundamentals of OOPS
Encapsulation
Abstraction
Polymorphism
Inheritance
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Inheritance
Note: Java doesn't support Multiple Inheritance.
• Inheritance is a mechanism in which one Object
acquires all the properties and behaviors of Parent
object.
• Using Inheritance we can create Classes that are built in
upon existing classes.
• When we Inherit from an existing class, then we can
reuse Methods and fields from
• Parent class and we can add new methods and fields
Java Supports:
Single
Inheritance
Multi Level
Inheritance
Hierarchal
Inheritance
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Polymorphism
Note: We can achieve Polymorphism by
Method Overloading and Method Overriding.
Definition:
Performing task/s in different ways.
Polymorphism derived from two Greek words,
Poly - means Many
Morphs - means forms/ways
So polymorphism means many ways.
Two types of
Polymorphism in Java
Compile Time
Polymorphism
Run-time
Polymorphism
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Abstraction
Definition:
• Abstraction is a process of hiding the implementation
details and showing functionality to the user.
• In another way it shows important things to the user
and hides internal details.
Ex: Sending email
• Abstraction focuses on what the Object does instead
of how it does.
• Abstraction can be achieved in two ways
Abstraction can be
achieved in two
ways
Abstract Class(0 to
100%)
Interface (100%)
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Encapsulation
Definition:
• Encapsulation is a process of wrapping code and data
together into a single unit.
Ex: Capsule (mixed of several medicines)
• It provides control over the data.
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Java Packages
Definition:
• A Java Package is a similar type of classes, interfaces
and sub packages.
• Two types of Packages in Java
• Built in Packages
Ex: io, util, sql etc...
• User defined Packages
Java Packages
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Java Programming Hierarchy
Note: We write Java code in the Class or Interface.
Java Project
Java Package
Java class/ Java Interface
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
QUIZ
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Quiz
Q 1. Out of the following which can
only test web applications?
a) QTP -Selenium
b) Functionality Testing.
c) Usability testing
d) Both B & C
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Quiz
Q 2. Selenium Web Driver have?
a) Own IDE
b) Programming Interface
c) None of the above
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Quiz
Q 3. Automated testing is?
a) To assure quality of software
b) To automate the manual testing
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Quiz
Q 4. What kind of tests should NOT be
automated?
a) Scalability Testing
b) Functionality Testing
c) Performance Testing
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Quiz
Q 5. Which browsers
support Selenium IDE ?
a) Google Chrome
b) Internet Explorer
c) Mozilla Firefox
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Hands-On
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Hands-on Lab
❑ Download and Install JDK8
❑ http://www.oracle.com/technetwork/java/javase/download
s/jdk8-downloads-2133151.html
❑ Configuring Computer with JDK
❑ Download ECLIPSE IDE LUNA
❑ http://www.eclipse.org/downloads/packages/eclipse-ide-
java-ee-developers/lunar
❑ Extract ECLIPSE IDE
❑ Configure ECLIPSE IDE with JDK
© Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved.
Email us – support@intellipaat.com
Visit us - https://intellipaat.com
Thank You

More Related Content

What's hot

Introduction to Selenium Automation
Introduction to Selenium AutomationIntroduction to Selenium Automation
Introduction to Selenium AutomationMindfire Solutions
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
Robot Framework Dos And Don'ts
Robot Framework Dos And Don'tsRobot Framework Dos And Don'ts
Robot Framework Dos And Don'tsPekka Klärck
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test AutomationPekka Klärck
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using SeleniumNaresh Chintalcheru
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introductionPankaj Dubey
 
Selenium Architecture
Selenium ArchitectureSelenium Architecture
Selenium Architecturerohitnayak
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...Simplilearn
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Simplilearn
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with seleniumTzirla Rozental
 
Test at Scale within your Internal Networks with BrowserStack Local Testing
Test at Scale within your Internal Networks with BrowserStack Local TestingTest at Scale within your Internal Networks with BrowserStack Local Testing
Test at Scale within your Internal Networks with BrowserStack Local TestingBrowserStack
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planningSivaprasanthRentala1975
 

What's hot (20)

SELENIUM PPT.pdf
SELENIUM PPT.pdfSELENIUM PPT.pdf
SELENIUM PPT.pdf
 
Introduction to Selenium Automation
Introduction to Selenium AutomationIntroduction to Selenium Automation
Introduction to Selenium Automation
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Robot Framework Dos And Don'ts
Robot Framework Dos And Don'tsRobot Framework Dos And Don'ts
Robot Framework Dos And Don'ts
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Test Automation
Test AutomationTest Automation
Test Automation
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
 
Selenium Architecture
Selenium ArchitectureSelenium Architecture
Selenium Architecture
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
 
test_automation_POC
test_automation_POCtest_automation_POC
test_automation_POC
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
 
Test automation process
Test automation processTest automation process
Test automation process
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
Test at Scale within your Internal Networks with BrowserStack Local Testing
Test at Scale within your Internal Networks with BrowserStack Local TestingTest at Scale within your Internal Networks with BrowserStack Local Testing
Test at Scale within your Internal Networks with BrowserStack Local Testing
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planning
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
 

Similar to Automation Testing Using Selenium

4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5hemasubbu08
 
Introduction to Selenium Webdriver - SpringPeople
Introduction to Selenium Webdriver - SpringPeopleIntroduction to Selenium Webdriver - SpringPeople
Introduction to Selenium Webdriver - SpringPeopleSpringPeople
 
test-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptxtest-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptxSyedZaeem9
 
Learn Selenium - Online Guide
Learn Selenium - Online GuideLearn Selenium - Online Guide
Learn Selenium - Online Guidebigspire
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automationSrikanth Vuriti
 
Python selenium
Python seleniumPython selenium
Python seleniumDucat
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Controlusha kannappan
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software TestingMohammed Moishin
 
How To Become A Selenium Expert?
How To Become A Selenium Expert?How To Become A Selenium Expert?
How To Become A Selenium Expert?ManojAgrawal74
 
Why is Selenium Software Testing Gaining Such a Huge Popularity?
Why is Selenium Software Testing Gaining Such a Huge Popularity?Why is Selenium Software Testing Gaining Such a Huge Popularity?
Why is Selenium Software Testing Gaining Such a Huge Popularity?adityakumar2080
 
Automated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDEAutomated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDERobert Greiner
 
white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...DreamTheory
 

Similar to Automation Testing Using Selenium (20)

4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Introduction to Selenium Webdriver - SpringPeople
Introduction to Selenium Webdriver - SpringPeopleIntroduction to Selenium Webdriver - SpringPeople
Introduction to Selenium Webdriver - SpringPeople
 
test-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptxtest-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptx
 
Selenium
SeleniumSelenium
Selenium
 
Learn Selenium - Online Guide
Learn Selenium - Online GuideLearn Selenium - Online Guide
Learn Selenium - Online Guide
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automation
 
Python selenium
Python seleniumPython selenium
Python selenium
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
 
Selenium
SeleniumSelenium
Selenium
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
How To Become A Selenium Expert?
How To Become A Selenium Expert?How To Become A Selenium Expert?
How To Become A Selenium Expert?
 
Why is Selenium Software Testing Gaining Such a Huge Popularity?
Why is Selenium Software Testing Gaining Such a Huge Popularity?Why is Selenium Software Testing Gaining Such a Huge Popularity?
Why is Selenium Software Testing Gaining Such a Huge Popularity?
 
BCS Selenium Workshop
BCS Selenium WorkshopBCS Selenium Workshop
BCS Selenium Workshop
 
Automated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDEAutomated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDE
 
white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...
 
selenium
selenium selenium
selenium
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Automation Testing Using Selenium

  • 1. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Data Science © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Automation Using Selenium
  • 2. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Introduction
  • 3. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Participant’s Introduction ❑ Name ❑ Professional experience ❑ Current role ❑ What you know about Tableau ❑ What you expect from the session
  • 4. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Agenda ✓ Why Automation ✓ Software Testing ✓ Types of Software's ✓ STE vs. SDET ✓ QTP vs. Selenium ✓ Introduction to Selenium ✓ Selenium Components ✓ Why Selenium Web Driver ✓ Disadvantages with Selenium ✓ Selenium with Java Overview ✓ Quiz ✓ Hands-On Lab
  • 5. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Getting Started with Selenium
  • 6. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Why Automation Test automation involves automating a manual process already in place that uses a formalized testing process. Converting manual test cases into test Script • 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
  • 7. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Automation Testing • Execute(Run) Test Script on Sprint(software) called Automation Testing • Prepare Test Scenarios Test Cases Test Data into Test Script Using {Testing Tools Selenium ,QTP . .} called Test Automation • Prepare Test Scenarios Test Cases Test Data Study User Stories {Requirements} SDET{Software Development Engineer in Testing} Manual Testing • Run TS,TC with TD on Sprint{Software} Operating Mouse & Keyboard • Prepare Test Scenarios Test Cases Test Data • Study User Stories {Requirements} • STE{Software Test Engineer} Software Testing
  • 8. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Types of Software • Developed Based on Specific Customer Requirements • Customer Should Pay • Customer is Owner • Example SBI, HDFC, AbhiBus • Developed Based on Market Requirements • Company Invest Money • Company is Owner • Example Operating System , Team viewer , Skype Software Project Based Software Product Based Software
  • 9. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Need for Automation Software Testing Functional Testing Performance Testing Other Non Functional Testing's Manual/Automation Manual/Automation Manual/Automation Manual Advantage Time Solving Decreases Cost and Complexity It takes Less Time
  • 10. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Software Testing Functional Testing • GUI Testing • Input Domain Testing • Error Handling Testing • Manipulation Testing • Database Testing • Data Volume Testing • Recovery Testing • Integration Testing Non Functional Testing • Usability Testing • Compatibility Testing • Configuration Testing • Performance Testing • Security Testing • Multilanguity Testing • Parallel Testing • Compliance Testing
  • 11. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Types of Software's 1-Tier Software 2-Tier Software 3-Tier Software n-Tier Software Native/Hybrid App Site in Mobile Description Window based Software Window based Software Web based Software Web Services Not Required Mobile Data Required Mobile Data Example Screens, Notepad, Calculator Screens with Database, Projects without Server Website, WebPages, WebServer, Database, Gmail Web Services, Web Server, Database, Cricket Score Offline Apps, Games Whatsapp Software Types
  • 12. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. QTP vs Selenium • • QTP • In recent economic crisis, software companies are planning for cost reduction and efficient productivity. • QTP is losing its market because of the following limitations: • Runs only in Windows environments. • Cannot test with all browser types and versions. • Limited to smaller organizations/ testing teams. • High licensing and add-inns costs. • Slow in execution when compared with open source tools. Selenium • Selenium is a robust set of tools that supports rapid development of test automation for web-based applications • Supports Cross Browser Testing.The Selenium tests can be run on multiple browsers and also supports all environment • Allows scripting in several languages like Java, C#,PHP and Python. • Open Source(Free of cost) • Assertion statements provide an efficient way of comparing expected and actual results. • Inbuilt reporting mechanism.
  • 13. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Selenium Jason Huggins and team from ThoughtWorks Inc. developed the testing tool in 2004 Huggins joked about competitor HP Mercury Tools saying cure mercury poisoning by taking Selenium supplements. Hence the name “Selenium” Works anywhere JavaScript is supported
  • 14. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Primarily, Selenium was created by Jason Huggins in 2004 Created JavaScript JavaScriptTestRunner Selenium Core Named it as Later re-named as Selenium
  • 15. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Selenium Components Selenium is not just a single tool , suite of tool’s. It has 4 Components: Shinya Kasatani Selenium Integrated Development Environment (IDE) Paul Hammant Selenium Remote Control (RC) Simon Stewart Selenium Web Driver Patrick Lightbody Selenium Grid
  • 16. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Selenium In 2006 Selenium Web Driver was launched at Google. In 2008 Whole Selenium Team Decided to Merge Selenium Web Driver with Selenium RC in order to form More Powerful tool called Selenium 2.0 Selenium IDE{Limited Use} Selenium RC {Remote Control} Out Dated Using only for Maintenance Projects Selenium Web Driver {Successor of Selenium RC} Selenium Grid{Only for Parallel Test Execution ,not for Test Design}
  • 17. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Selenium Suite Selenium IDE Selenium RC Selenium Web Driver Selenium Grid Selenium2 Selenium3 Merged Enhanced Simon Stewart Patrick Lightbody Paul Hammant Shinya Kasatani
  • 18. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Selenium IDE The IDE will be opened Now perform the operations on the application as you are testing the application 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 Go To Tools Selenium IDE
  • 19. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Selenium RC Selenium 1.0 • 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 • Once the Scripts are recorded add assertions where ever required • Now format the Selenese test into the language of your choice. • Please refer to the Image
  • 20. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Selenium Grid a. Selenium Grid is a part of the Selenium Suite b. Selenium Grid has a Hub and Node Architecture. c. To Run your tests against different browsers, operating systems, and machines all at the same time d. If you set up Selenium Grid to run, say, 4 tests at a time, then you would be able to finish the whole suite around 4 times faster. e. It support both Selenium RC and Web Driver scripts.
  • 21. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Selenium WebDriver Selenium WebDriver Architecture Selenium 2.0 WebDriver is designed to providing a simpler and uniformed programming interface Same WebDriver script runs for different platforms Support multiple programming language: • Java, C#, Python, Ruby, PHP, Perl…
  • 22. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Why Selenium WebDriver • We can Freely Download & Use • We can do Enhancements Selenium is Open Source Software • MS Windows • Linux • Macintosh • Apple OX Selenium Supports different Operating Environments • Google Chrome • Linux • Mozilla Firefox • IE • Safari • Opera……. Selenium Supports different Browser Environments • Web Based • Mobile Based – Applications Having Web Forms Selenium Supports different Application Environments • Java • C# • Python • JavaScript (Node) • Ruby Selenium Supports different Programming Environments
  • 23. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Disadvantages with Selenium ❑ It doesn’t generate detailed Test Reports ❑ No reliable support ❑ Difficult to setup environment ❑ Limited support for Image based testing ❑ No other tool integration for test management
  • 24. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Selenium with Java Why we choose Java ? why don’t we go for Other Programming Languages since Selenium has Compatibility with Other Programming Languages ? ❑ Selenium written in Java ❑ Knowledge sharing is very easy , as Majority of Selenium Testers (nearly 77%) using Java,. ❑ Java is Platform Independent (can use on Any Operating System)
  • 25. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. JDK Any OS Eclipse IDE Java Project Package Class Main() { ---- ----- } Selenium Web Driver Jars Pages in IE Pages in Chrome Pages in Firefox Web Server DB Chrome Driver Tester Computer
  • 26. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Java Environment Setup Download Java (JDK) Software and Install Set Environment Variable (Path variable) Download Eclipse IDE and Extract. • Create Java project • Create Java Package • Create Java Class /Program
  • 27. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Establish Test Environment JDK SETUP STEPS Check Computer OS bit Size Ex: 32bit or 64 bit? 32 bit (windo ws x86) 64 bit (windo ws x64) Now follow below Navigation to Download JDK8 w.r.t bit size of OS Launch Google Browser. Enter JDK8 Download Click Search goto Oracle.com.site http://www.oracle.c om/technetwork/jav a/javase/downloads /jdk8-downloads- 2133151.html Java SE Development Kit Accept License Agreement RADIO BUTTON Click JDK Link wrt bit size of OS ex: JDK x86 for 32bit JDK x64 fro 64bit OS Paste that download in your selected folder Create Personal Folder in your selected Drive Paste that download into your Personal Folder without Space EXAMPLE: Intelipaat
  • 28. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Establish Test Environment Configuring Computer with Java Open your Personal Folder and Double Click on Download Enter JDK8 Download Click next until Finish After Installing check Java Folder in your C drive-programfiles- javafolder-jdk Goto JDK folder in C:ProgramfilesJavaJ DK1.8.0. Copy Path of JDK Folder Right Click on MyComputer Icon Go to Properties Advanced System Settings Environment Variables Click New for System Variables Variable name: JAVA_HOME Variable value: c:programfielsjavajd k18.0_20 OK Cancel Click OK Goto Path Variable- >Select Path->Click Edit ->Without Distrubing Existing Path Paste c:programfielsjavajd k18.0_20bin;
  • 29. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Establish Test Environment To check JDK installed Properly or not? Open Command prompt Type cmd in Start search Enter Following Commands • C:> D: • D:> java • D:> javac Able to see www.oracle.com
  • 30. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Establish Test Environment ECLIPSE IDE Setup Goto google Click next until Finish Enter Eclipse Juno SR2 download Click Search. Go to Eclipse.org.site Go to windows 32 bit or 64 bit Click Download Paste that download in Personal folder Extract that download in Personal Folder Open Eclipse Folder after Extract You will find Eclipse Icon Right click on Icon Select Desktop(Create Short Cut) Eclipse Ide will be visible on Desktop Double click on Eclipse Icon Then you will find for first time Workspace Option Select your Personal Folder To change workspace folder Goto file menu in Eclipse Switch to Workspace Other
  • 31. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Establish Test Environment JAVA PROJECT CREATION IN ECLIPSE Eclipse File New Select Option Other Choose Java Project New Java Project Project Name (Lowercase Only) Place Tick on Default Location Click Finish Project Created
  • 32. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Establish Test Environment JAVA PROJECT CREATION IN ECLIPSE Note:- After Completion of Java Project Creation in Eclipse. Check JRE Version(Run Time Version) Right Click on Java Project Properties Java Compiler Change to Latest Version(1.8) Java Build Path Libraries Remove Lower Version JRE System-> Library Click(Add Library) Select JRE System Library as Latest(1.8) Click Finish Click Ok
  • 33. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Establish Test Environment JAVA PACKAGE CREATION Right Click on Java Project File New Package Enter name to Package(Lowercase) Click Finish CLASS CREATION IN JAVA PACKAGE To Create a Class with main Method Right Click on Package New Class Enter Name to Class in Name Blank Class name Starts with Uppercase(Ex: Test) Note: Do Tick mark on Public Static void main(stringargs[]) Click Finish Select main method option Click Finish
  • 34. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Prerequisite Java for Test Automation using Selenium Core Java is sufficient, Advanced Java is not required.
  • 35. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Core Java Java Fundamentals Data Types and Variables Operators Decision Making Arrays Loops Java OOPS Concepts Classes and Objects Class Constructors String Class Core Java
  • 36. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Object State Variables Dog Breed ,Color Behavior Methods Barking, Running Object is Instance of Class Object is a Collection of Methods and Variables Classes are the templates for the creation of objects Class Dog Note1:- The difference between a class and an object is that class are created when the program is created but the objects are created at the run time. Note2:- A method can produce some value or return some value. If the method is returning some value then the type of value that a method can provide (or return) is written on the left side of the method name. But when it does not , then method is to be declared as void method.
  • 37. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Dog(Class) Object1(Tommy) Object1(Honey) Object1(Jimmy) Breed Lifespan Color Barking Running State(Variables) Breed Labrador Lifespan 7 Years State(Variables) Breed German Sheppard Lifespan 9 Years State(Variables) Breed Rot wheeler Lifespan 7 Years Behavior(Methods) clean-cut head Friendly powerful jaws Swimmers Bomb Detectors Behavior(Methods) barkers. Digging Chewing Behavior(Methods) fearless expression calm and confident aloof toward strangers
  • 38. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Fundamental Concepts
  • 39. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. 1. Documentation Section 2. Package declaration Statement 3. Import Statements Structure of Program in Java We import built in and User defined libraries using import keyword Ex: import java.io.Console; import java.lang.*; import - It is a Java keyword to import Libraries. java –Project io –Package Console – Class lang.*; - import all classes from lang package. Ex: package xyza;
  • 40. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. public class Sample { } public - Access Modifier class - Java keyword to declare a class Sample - it is the Class name (You can use any meaningful name) 4. Class declaration Statement Structure of Program in Java
  • 41. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Structure of Program in Java (* It is the mandatory statement in every Java program) public static void main (String [] args) { } public - Access Modifier static - Non-Access Modifier (use main method without invoking any object) void - Returns nothing main- method name 5. main Method (Java Program execution starts from main method)
  • 42. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Structure of Program in Java Structure of Program in Java We can Declare Variables and Constants. Other Statements System.out.println(“Automation Using Selenium"); System - Class (Pre-defined) out - Object println - method “Automation Using Selenium" - Message 5. Declarations
  • 43. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Structure of Program in Java -Decision making -Loop -Method blocks (method declaration before the main method, but we access methods after main method) etc... ------------------------------------- > Every normal statement/step ends with semi colon > Every code block enclosed with {} 7. Code Blocks
  • 44. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. First Program in Java //Documentation package xyza; import java.io.Console; import java.lang.*; public class Sample { //Create a Method(User defined) public int multiply(int a, int b, int c){ //multiply is the method name //a,b,c are Integer Data Types int result = a * b * c; //Multiplication Operation return result; } public static void main (String [] args){ // This is a sample Program int a = 10, b, c; //Variables Declaration b = 20; c = 30; //Initialization final int money =100;//Constant Declaration System.out.println("Addition of a, b is " + (a + b));//Addition of a, b is 30 System.out.println(money);//100 System.out.println(c);//30
  • 45. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. //Decision Making if (a > b){ System.out.println("A is a Big Number"); } else { System.out.println("B is a Big Nuber"); }
  • 46. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. //Loop for (int d=1; d <=10; d++){ System.out.println(d); } //Create Object and access Methods Sample obj = new Sample(); int x = obj.multiply(10, 25, 50); System.out.println(x); } }
  • 47. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Comments in Java Comments are English words used for Code documentation. Purpose of Comments a) To make the code Readable b) To make the code disable from execution Use // for Single line comment Use /* Usage of Comments in Test Automation a) To write Test Case header b) To write Method header c) To explain complex logic etc... */ for multiple lines comment
  • 48. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Data Types Primitive Data Types Non-Primitive Data Types/Reference DT What is Data Type? A data type indicates the type of data the variable can represents, such as integer, floating point numbers, character, Boolean or an alphanumeric string.
  • 49. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Primitive Data Types Primitive Data Type Integer Types Relational Types Characters Conditional 1. byte (8 bits) byte a =10; 2. short (16 bits) short a =10000; 3. integer(32 bits) int a = 100000; 4. long (64 bits) long a =100000000000000; 5. float (32 bits) float a = 1.23; 6. double (64 bits) double a =123.345654322; 7. character char a ='Z' 8. Boolean boolean a = true;
  • 50. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Non-Primitive Data Types Non-Primitive Data Type Objects Array
  • 51. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Operators in Java Operators are used to perform Mathematical, Comparison and Logical operations. Categories of Operators: S.No Operator Name Operator Category a. Arithmetic Operators - + * / % ++ -- b. Relational Operators > < >= <= == != c. Bitwise Operators & | ^ >> >>> d. Logical Operators && || & | ! ^ e. Assignment Operators = f. Miscellaneous Operators += -= *= /= %=
  • 52. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Flow Control Statements Conditional Statements If Statement Switch Statement Loop Statements For loop While loop Do While loop Enhanced For loop (arrays)
  • 53. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Conditional Statements Types of Condition Single Condition (Positive/Negative) (1) Compound Condition (2) Nested condition (3,4,5) •Execute a block of statements when condition is True. •Execute a block of statements when condition is True, otherwise execute another block of statements. •Decide among several alternates (Else If) •Execute a block of statements when more than one condition is True.(nested If) •Decide among several alternates (Switch statement) Usage of Conditional Statements
  • 54. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Arrays in Java Definition: Array is a collection of similar type of elements. • In Java, Array is an Object that contains elements of similar data types. • Java Array is index based, index starts from Zero. • The length of an Array is established when the Array is created and Array length is fixed. • Each item in an Array is called an Element.
  • 55. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Methods in Java Basically Methods are Two types: Definition: Methods are also known as Functions. • In structured programming (Ex: C Language) we use Functions(Built-in and User defined), • In Object oriented programming we use Methods (Built-in and User defined). Built in Methods Number Methods Character methods String Methods Date & Time Methods etc... User defined Methods Method with returning value Method without returning any value.
  • 56. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Exception handling In Java Definition: In Computer programming, Exception is an abnormal condition. • An exception is an event that occurs during the execution of a program that disturbs the normal flow of instructions. • The Run-time errors so that normal flow of the program can be maintained exception handling in java is one of the powerful mechanism to handle
  • 57. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Object Oriented Programming System Concepts
  • 58. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Object Oriented Programming System Concepts Four Fundamentals of OOPS Encapsulation Abstraction Polymorphism Inheritance
  • 59. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Inheritance Note: Java doesn't support Multiple Inheritance. • Inheritance is a mechanism in which one Object acquires all the properties and behaviors of Parent object. • Using Inheritance we can create Classes that are built in upon existing classes. • When we Inherit from an existing class, then we can reuse Methods and fields from • Parent class and we can add new methods and fields Java Supports: Single Inheritance Multi Level Inheritance Hierarchal Inheritance
  • 60. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Polymorphism Note: We can achieve Polymorphism by Method Overloading and Method Overriding. Definition: Performing task/s in different ways. Polymorphism derived from two Greek words, Poly - means Many Morphs - means forms/ways So polymorphism means many ways. Two types of Polymorphism in Java Compile Time Polymorphism Run-time Polymorphism
  • 61. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Abstraction Definition: • Abstraction is a process of hiding the implementation details and showing functionality to the user. • In another way it shows important things to the user and hides internal details. Ex: Sending email • Abstraction focuses on what the Object does instead of how it does. • Abstraction can be achieved in two ways Abstraction can be achieved in two ways Abstract Class(0 to 100%) Interface (100%)
  • 62. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Encapsulation Definition: • Encapsulation is a process of wrapping code and data together into a single unit. Ex: Capsule (mixed of several medicines) • It provides control over the data.
  • 63. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Java Packages Definition: • A Java Package is a similar type of classes, interfaces and sub packages. • Two types of Packages in Java • Built in Packages Ex: io, util, sql etc... • User defined Packages Java Packages
  • 64. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Java Programming Hierarchy Note: We write Java code in the Class or Interface. Java Project Java Package Java class/ Java Interface
  • 65. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. QUIZ
  • 66. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Quiz Q 1. Out of the following which can only test web applications? a) QTP -Selenium b) Functionality Testing. c) Usability testing d) Both B & C
  • 67. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Quiz Q 2. Selenium Web Driver have? a) Own IDE b) Programming Interface c) None of the above
  • 68. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Quiz Q 3. Automated testing is? a) To assure quality of software b) To automate the manual testing
  • 69. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Quiz Q 4. What kind of tests should NOT be automated? a) Scalability Testing b) Functionality Testing c) Performance Testing
  • 70. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Quiz Q 5. Which browsers support Selenium IDE ? a) Google Chrome b) Internet Explorer c) Mozilla Firefox
  • 71. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Hands-On
  • 72. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Hands-on Lab ❑ Download and Install JDK8 ❑ http://www.oracle.com/technetwork/java/javase/download s/jdk8-downloads-2133151.html ❑ Configuring Computer with JDK ❑ Download ECLIPSE IDE LUNA ❑ http://www.eclipse.org/downloads/packages/eclipse-ide- java-ee-developers/lunar ❑ Extract ECLIPSE IDE ❑ Configure ECLIPSE IDE with JDK
  • 73. © Copyright, Intellipaat Software Solutions Pvt. Ltd. All rights reserved. Email us – support@intellipaat.com Visit us - https://intellipaat.com Thank You