User Manual For Selenium Framework
User Manual For Selenium Framework
User Manual For Selenium Framework
For
Selenium Framework
Page 1
Contents
Page 2
Selenium Framework
Page 3
How to configure Selenium Framework in eclipse and run
your test case through it??
Framework Introduction
This Excel based framework will let you write your test
cases in excel sheets.
Even a non technical guy whose hasnt have much
coding knowledge will be able to automate test cases.
With a small guidance a new user can start automating
test case.
This framework is keyword driven framework so you
just need to learn few keywords to automate your test
cases.
Because we are using a common centralize object
repository so change at one place will reflect in entire
project, thus it saves time and effort.
Because this framework is build over selenium, So
execution speed is comparatively faster than other
automation tools (QTP,TestComplete,CodedUI etc).
Free of cost.
Page 4
1.High Level Architecture Diagram
TestCase,ObjectRe
positoy and
TestData Excel
Selenium framework
reads test cases and
executes them
IE
Chrom
Call Report
engine to
generate report.
Html/X
Report ML
Engine report
Page 5
2.Class Level Data Flow Diagram
Engine call
TestcaseRead
er and gets
all the test SeleniumDriver
cases in a Engine call ActionCaller class class interect
MAP object and passes the test case
IE with browsers
data row by row
ActionCa SeleniumD FF
Page 6
3.Framework Structure
Page 7
1. Com.Driver : This package contains two classes.
a. Driver : The Driver class is the parent class which initialize
Driver, Element , ObjectRepository and all the global/protected
variables to be used during run time.
b. SeleniumDriver :
i. This class extends Driver class to get Driver and Element
object.
ii. This class contains various functions to perform action on
webpage and browser.
Page 8
4. Com.Report : This package consist of 2 classes.
a. XmlReport : This class is used to create xml report of the
execution.
b. htmlReport : This class is used to generate HTML report of
execution.
Page 9
i. Multiple test case should be separated by ; (eg :
DP.FlightBooking.BookaFlight ; DP.CarBooking.BookaCar )
ii. Test case name should be start with sheet name followed
by dot (.) and then test case name.
8. Images : This folder contains images and css files for reporting
purpose. This folder gets copied to result destination folder when
execution starts.
a. POI : contains poi jars, which provide libraries to read excel files.
b. JavaMail : Contains mail.jar to send mail.
c. Selenium : Contains selenium jars.
Page 10
FrameworkGUI
Page 11
1.HighLevel Architecture Diagram
Selenium
Page 12
2. FrameworkGUI Structure.
Page 13
1. Com.Form : This package contains 2 classes.
a. TestCaseNameReader : This class reads test case names from
excel.
b. UpdateFile : This class updates config file of
SeleniumFramework on the basis of parameters passed by
ButtonActionListener Class.
Page 14
3. Look and Feel of Framework GUI
Page 15
How to run your test case without
eclipse?
Page 16
Introduction
This framework will let u run create and run your test case
with eclipse. The following are the benefits of using it
Page 17
1.High Level Architecture Diagram
TestCaseRunner Batch
Chro
Step 3. Excel batch file put all
depending jars(Selenium & POI ) Step 7. Call Report me
to class path and call Selenium engine to generate
Framework Main() Function to report.
start test case execution
ReportEngin HTML/X
ML
Page 18
2.2. Framework Structure
Page 19
1. Drivers : This folder contains drivers for IE and Chrome browsers
2. Html-dat : Contains images and css files for reporting.
3. Jar : This folder contains 3 subfolders
a. POI : contains Apache POI jars.
b. Selenium : contains selenium jars.
c. Spring : contains spring jar.
4. OpenJaw : this folder contains test case and object repository excel
files.
5. Report : this folder contains execution reports.
6. Config : This is a properties file which contains various parameters
as discussed above (5th point of Selenium framework section) .
Parameters under this file need to set before execution.
7. Excel bat : This is a batch file which put all dependent jars
(selenium, reporting and POI) on class path and run main method of
selenium framework jar.
8. SeleniumDriver : This is a jar file of Selenium Framework project.
9. TestcaseRunner Bat : This is a batch file which put all dependent
jars (POI and spring ) on classpath and run main method of
TestcaseRunner jar.
10. TestcaseRunner : This is a jar file of TestcaseRunner project.
11. htmlReport.xls : This file contains xls script to generate html
report from xml file.
1. Update your config file with correct data as per your machine
requirements.
2. Double click on TestcaseRunner batch.
3. This will open a GUI form, select your test case, browser name and
other stuff and click on run button.
4. This will start executing your test case on selected browser.
Page 20