Author: David Lai


        WTF - Web Test Framework [![Build Status](](

Web Test Framework's (referred to as WTF for short) goal is to build on top of Selenium 
Webdriver tools and and libraries to provide a structured test framework for testing a 
Web Applications in a maintainable manner.  The goal is to provide the project structures 
and tools to help QA/SDET professionals quickly setup and develop acceptance level web 
tests which are configurable, robust, and easy to use.  The ultimate goal is to build a 
common framework that is highly configurable, maintainable, and easy to use.


*	Python 2.7 -
*	PyPi (pip) -

Installation via PYPI

	pip install wtframework

Setting up your project

Run the following command to initialize an empty project structure for a WTF test. YourProjectName --withexamples

Windows Note: .py files may not be executable, you may have to prefix these commands 
with the python command. 

	python YourProject --withexamples
This will create an the folders and packages of your project.  You'll see something like:

		/assets - place non-code files used in your tests here.
		/configs - location of config files.
		/data - data files (like CSV files) goes here.
		/reference-screenshots - if enabled, reference screenshots are placed here.
		/reports - test result XML files will go here when you run tests.
		/screenshots - screenshots taken on test failures will go here.
		/tests - top level package for your test code.
			/flows - high level reuseable multipage flows.
			/models - data models go here. (like DataBase ORM code)
			/pages - Your page objects go here.
			/support - reuseable support utility functions go here.
			/testdata - custom code for working with test data.
			/tests - Your high level tests will go here.
Now the directory structure and your python path is setup to run tests in WTF framework.

Running your tests

Run your tests.

	./ [-c ConfigFile]

This will execute the unit tests in the `tests/tests` folder.  The test results will be
written to `reports/`, any screenshots taken during errors will be stored in the
`screenshots/` folder.

Configuring Eclipse/PyDev Environment
1.	Download/Install Eclipse.
2.	Install the PyDev plugin.
3.	Goto Eclipse -> Preferences (Or on windows, this Window -> Preferences )
4.	Goto PyDev -> Interpretor Python then open the Libraries tab.
5.	Add you python site-packages (where pip installs packages to)
	At this point your PyDev enviornment should be able to recognize your 
	installed packages.
6.	In Eclipse,  goto "File" and create a new PyDev project.
7.	Fill out the required fields and use your generated project structure as
	your Project folder.  This should create the PyDev project files necessary to
	allow you to work on this project as a PyDev project.
8.  Open the project settings, then under "PyDev - PYTHONPATH" settings, add 
    your project base directory as a source folder.  Then save.

At this point, you should be able to right click, select "Run As" and execute your test 
cases as PyUnit test case.

Installing the WTF PageObject Utility Chrome Extension
1. Download or clone the source.  The extension source code is included under 
   `/browser-plugins` directory.
2. Open Chrome.
3. Open the Chrome's Preferences menu, and select "Extensions"
4. Enable the "Developer mode" checkbox.
5. Click on the "Load unpack extension..." button.
6. Then select the "chrome" folder under the 'wtframework/browser-plugins/' directory.
7. At this point the plugin should be installed.  You can test out the plugin by going 
   to another webpage, clicking on the `WTF` extension button in y