Scoping out what a more simple Java Test Framework might look like. The name is provisional, but the intent is for this to be easy to use with Sauce Labs specifically. We want something flexible that encourages good practices The plan is to essentially create a light-watir implementation in Java, with the most powerful and easiest to implement features, along with some of the best features of page-object gem
Inspiration for this code drawn from numerous places including:
See LICENSE file for details.
This is not currently released on Maven. For now you can use it locally by running:
mvn package
mvn install
- Easy to toggle Local & Remote
- Easy to use with Sauce Bindings
- Support for Desktop & Mobile
- Allow automatic relocation of Stale Elements
- Smart Synchronization Strategy
- Simple Form Filling
- Test Runner agnostic (Thread Safe!!)
- Discourage imperative test writing
- Implementation for generating Browser Options
- Basic browser wrapper
- Basic element wrapper
- Synchronization implementation for element methods
- Staleness Relocation
- Collection Support
- Page Object Implementation
- Data Object Implementation
- Nested Elements Supported
- Execute Script
- Actions Class Wrapper (Scroll, Hover, Right Click, Double Click, Drag & Drop)
- Direct Support for IFrames
- Subclass Elements
- Automatic Form Filling
- Automatic Data Reading
- Logging Support
- API Integration
- Alert Wrapper
- Windows Wrapper
- Screenshot Wrapper
- Cookies Wrapper
- Scrolling Support
- After Hooks
The test directory has a number of examples to demonstrate usage, but basically the syntax looks like:
Browser browser = new Browser();
PageObject.setBrowser(browser);
browser.goTo("https://www.saucedemo.com/");
userName userName = browser.element(By.id("user-name"));
userName.setText("standard_user");
Element password = browser.element(By.id("password"));
password.setText("secret_sauce");
Element submitButton = browser.element(By.className("btn_action"));
submitButton.click();
Assert.assertEquals("https://www.saucedemo.com/inventory.html", browser.getCurrentUrl())
browser.quit();
There are also a basic DataObject
and PageObject
classes that will allow you to