Professional Documents
Culture Documents
Selenium Info
Selenium Info
what is Selenium
Selenium is mainly used for Functional and regression Testing (Test Automation)
MS windows
Macintosh etc.,
Linux
Selenium supports various Browsers to create and execute Tests/Test Cases/ Test Scripts
Mozilla Firefox , Google Chrome , Internet Explorer / MS edge ,Opera and Safari ect..
#########################################################
In 2008 the whole selenium Team decided to merge with Selenium WebDriver with Selenium RC in
Orders to form powerful tool Called selenium 2.0
Selenium 1.0
Selenium2.0
In Selenium 2.0 default browser is Mozilla Firefox , But in 3.0 No default Browser
###############################################################
Features:
Is used to create and execute test cases using Mozilla Firefox Browser
(*Record Test Steps / Type test steps using element locators and selenium IDE commands)
Using Selenium IDE we can create Test Cases and form Test Batches / Suites/Set
We can export Selenium IDE Test Cases to other supported formats (Java / Ruby)
Disadvantages:
Selenium WebDriver don’t have IDE and but having programming Interface
Testers /Users use Element Locators and WebDriver API Commands /Methods to create Test Cases
Selenium WebDriver supports various Bowsers, Operating environments and programming languages to
create Testcases / Test Scripts /Programs
Support Batch Testing ,Data driven Testing ,Cross Browser Testing and Data Base testing.
Note: Selenium WebDriver is the only tool for creating and executing test cases. Selenium Grid is only
to execute Test Execution …
CUI : NO
Mobile Software:
Native Application : NO
Hybrid Application : NO
Note : Using Selenium Based Frameworks like Slendroid and Appium we can conduct testing for all types
of mobile applications.
5.Selenium License
Open source software and any one can download and use with free
6.Advantages of selenium
7.Disadvantages of Selenium
9. Selenium Vs UFT/QTP
1. Planning
2. Generate Basic Test Case
3. Enhance Test Case
4. Run and Debug Test Case
5. Analyze Test Result and Report Defect
Download Java (JDK) (Your OS compatible software and install in your computer
Download Selenium Web Driver Java Language binding from seleniumhq.org, add those jar files to Java
project in Eclipse IDE
Using Element Locators and WebDriver API Commands (no recording) we write Test steps
Enhance Test cases:
3.Synchorization: using Java programming wait feature (Sleep time) or Selenium WebDriver command
5.Adding comments (to make the code / test script readable) and disable the code from execution.
Running Tests: Run Single test case and Run Test Batch
In Selenium WebDriver using Programming or using Testing Frame work we can do batch Test
Debug Test case: Locating and Isolating errors through step by step process
##################################################
Selenium Fundamentals
Selenium WebDriver
Selenium Project
##################################################
Java for Selenium: Selenium supports 6 programming languages and we use Java
Editions of Java
Selenium Automated Testing using Java Standard Edition is enough (Core Java)
Computer Programming:
Ex : data Types, Variables ,Operators ,Control Flow ,IO & File handling and Strings etc
Variables: To store the data the data in Computer Programming ( In temporary Memory )
1.Comment: To make the code readable and Make code disable from Execution
Note: Java supports single line syntax and multi-line syntax.
2. Data types:
3.Modifiers In Java
Modifiers are used to set access levels for classes, Methods and Variables
Java supports two categories of Modifiers
a. Access modifiers (default, public, private and protected)
b. Non-access modifiers (static, final and abstract.)
4.Variables: A named memory location to hold / store temporary data with in a program
Java supports three types of variables: Local variables, Instance variables, Static /Class variables
Note : Java supports explicit declaration of Variables only ( we need to declare first , before using )
5.Operators in Java: Operators are used to conduct Mathematical comparison and Logical Operations
a. Arithmetic Operators
b. assignment Operators
d. Logical Operators
7.Arrays in Java
Array is collection of similar type of elements. In Java Array is Object and we can use Array to store
series of values.
IO operations: Read data using Input Devices (Mouse and Key Board)
To handle text files use predefine classes like File Class etc..
To Handle Excel files download external jar file and add that Jar file to Java project and handle excel files
2.Predifined features
3.External features
Selenium Class 6 : Java Part 2
What is method?
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 class. We can inherit from
existing class, then we can reuse methods and fields from the parent class.
Abstraction: Abstraction is a process of hiding the implementation details and showing functionality to
the user.
Java Packages
Uses of Java : Java is used to develop desktop applications ( Ex : Accor boat reader)
Mobile applications
Embed systems
2.Modifiers:
3.DataTypes: We use data types for handling different type of data in our test cases
6.Conditional Statements: we use to insert verification points and for error handling.
9.IO operations: We use for handling Input and Output in our test cases
11. Exception Handling: we use to handle run time errors in our test cases.
Selenium Class 7 : Java Environment setup :
Java Environment setup and verify the setup: In order to write and execute Java programs, Java
environment is required.
1.Write a program
2.Compile the program (converting high level language to machine level language)
Steps for writing & Executing Java programs using command line prompt
Step 3 : write Java program in notepad and save the Java program file with .java extn
Step 4 : Compile the Java program from command line prompt and run it
Navigation:
Slect PATH Variable from system variable > Edit > Paste “C:\Program Files\Java\jdk-10\bin”
OK
OK
OK
Step 1
Eclipse IDE : Eclipse IDE is a platform to write and execute computer programs like Java , Python , PERL ,
Ruby and PHP etc.
It provides editor for writing programs, syntax guide, context help and auto compilation etc.
1.Documentation section
2. Package Statement
3.Import Statements
4. Class declaration
5.Interface section