Selenium Framework Implementation Guide
Selenium Framework Implementation Guide
Selenium Framework Implementation Guide
Version 1.0
September 2009
DISCLAIMER
Verbatim copying and distribution of this entire article is permitted worldwide, without
royalty, in any medium, provided this notice is preserved.
Table of Contents
TABLE OF CONTENTS
1. PURPOSE OF THE DOCUMENT ........................................ 3
Open2Test.org Page ii
Selenium Open Source Test Automation
Framework Implementation Guide
Open2Test.org Page 3
Selenium Open Source Test Automation
Framework Implementation Guide
File\Folder
Name Location
Test Suite C:/Innovez/Selenium_Automation/Test_Suite.xls
Test Script C:/Innovez/Selenium_Automation/Test_Scripts/
Object
Repository C:/Innovez/Selenium_Automation/Test_Data/Object_Repository.xls
Summary
Report C:/Innovez/Selenium_Automation/Test_Reports/
Screen Shot C:/Innovez/Selenium_Automation/Test_Reports/ScreenShot_Repor
Report t/
Detailed Report C:/Innovez/Selenium_Automation/Test_Reports/Detailed_Report/
Open2Test.org Page 4
Selenium Open Source Test Automation
Framework Implementation Guide
c. Define the test scripts in the test suite Excel like below
Open2Test.org Page 5
Selenium Open Source Test Automation
Framework Implementation Guide
3. Selenium RC – Server up
Open2Test.org Page 6
Selenium Open Source Test Automation
Framework Implementation Guide
Open2Test.org Page 7
Selenium Open Source Test Automation
Framework Implementation Guide
Open2Test.org Page 8
Selenium Open Source Test Automation
Framework Implementation Guide
Open2Test.org Page 9
Selenium Open Source Test Automation
Framework Implementation Guide
5. Call to Framework
The Main.rb should be opened in the SciTE. Press F5 and this will call
the framework file associated with the test and perform the actions by
interpreting the keywords specified in the data table.
Instead of pressing F5, we are able to run the main.rb by command ruby
<main.rb>
Open2Test.org Page 10
Selenium Open Source Test Automation
Framework Implementation Guide
6. Usage of Keywords
The keywords should be entered in Sheet1 of Microsoft Excel placed in
the Test Scripts folder. The syntax for the keywords can be found in the
Selenium Keyword Reference Dictionary Document. Below is an example of a
simple keyword-driven scripting.
Open2Test.org Page 11
Selenium Open Source Test Automation
Framework Implementation Guide
Open2Test.org Page 12
Selenium Open Source Test Automation
Framework Implementation Guide
Open2Test.org Page 13
Selenium Open Source Test Automation
Framework Implementation Guide
8. Resource Files
The resource files such as Framework Files, Shared Object Repositories,
and Environment Variables that are associated with the test can be
stored in the user’s machine and can be obtained during test execution.
Function libraries of the file type .rb, environment variables of file
type .excel, and object repositories of file type .excel can be placed
in the folder specified in the Utility Excel.
File\Folder
Name Location
Test Suite C:/Innovez/Selenium_Automation/Test_Suite.xls
Test Script C:/Innovez/Selenium_Automation/Test_Scripts/
Object Repository C:/Innovez/Selenium_Automation/Test_Data/Object_Repository.xls
Summary Report C:/Innovez/Selenium_Automation/Test_Reports/
Screen Shot
Report C:/Innovez/Selenium_Automation/Test_Reports/ScreenShot_Report/
Detailed Report C:/Innovez/Selenium_Automation/Test_Reports/Detailed_Report/
Library files
1. Main.rb
2. Functionlibrary.rb
Open2Test.org Page 14
Selenium Open Source Test Automation
Framework Implementation Guide
Open2Test.org Page 15
Selenium Open Source Test Automation
Framework Implementation Guide
COPYRIGHT
This library is free software; you can redistribute it and/or modify it under the terms of the
GNU Library General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this
library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301, USA.
Open2Test.org Page 16