Web Automation Framework

Project Status: 90%

Just a simple to use, extremely portable, cross-platform, command line operable, java-based, Selenium + testNG framework for web automation testing on the usual suspects of browsers. Tutorial videos to come eventually…


Github

Selenium TestNG Java Web Automation Framework

Simple Instructions

Writing Tests

Utilities

Screenshots

new WAFScreenShotter(, ""); // takes picture of current page and puts it current directory

- do not add a file extension to the picture name argument, a `.jpg` is automatically added
- if you already have a `WAFScreenShotter` object you can simply use the `.takeScreenshot()` method to take another screenshot
```java
myWAFScreenShotter.takeScreenshot(driver, "example");
// takes picture and places "example.jpg" in current directory

File Downloads

new WAFFileDownloader(, "", ""); // downloads all files on current page based on selector into the user specified folder

- be sure to include "Files" (capitalization matters) somewhere in your folder name if you want the folder deleted when `make clean` is run
- almost all of your CSS selectors should end in `a` since you should be clicking links to download files
- if you already have a `WAFFileDownloader` object you can simply use the `.downloadFiles()` method to download additional files
```java
myWAFFileDownloader.downloadFiles(driver, "my-Files-Folder", "td > a");
// downloads all files on the page that are table element links

Compiling and Running Tests

Linux without CLI Arguments

Linux with CLI Arguments

Windows with/without CLI Arguments

Optional Arguments

<OPTIONAL ARGUMENTS> is replaced by your command line arguments

Output

Cleaning/Resetting (Linux Only)


Detailed Explanation

Overview

This framework works in the following manner: 1) All java files are compiled 2) Main is run 1) Parses optional arguments 2) Creates build.xml TestNG 3) Uses build.xml as a template to run tests 1) Initializes web driver 2) Performs actions using Selenium 3) TestNG test assertions are checked 3) TestNG framework creates output .html and .xml files to view test results

Making (Linux Only)


Developers

Changelog


Trouble Shooting

Known Bugs