Fluent Page


Project maintained by JockX Hosted on GitHub Pages — Theme by mattgraham

Fluent Page for Selenium/Thucydides

Fluent Page is a Selenium/Thucydides PageObject extension adding a bit more functionality to your average PageObject. By making a PageObject extend net.jockx.fluentpage.Page class you can easily chain assertions, logging statements and PageObject's own methods while keeping reference to the page currently processed by WebDriver method calls.

Features:

Page.get(SomePageObject.class);
Page.navigateTo(SomePageObject.class);
Page.waitForPage(SomePageObject.class);
Page.navigateTo(SomePage.class)
    .clickButton()
    .assertion.assertTrue(condition, "Message")
    .logger.info("Some logging statement")
    .clickAnotherButton()

Usage:

public class MyPageObject extends Page<MyPageObject>
PageB clickGoToPageB(){
    gotoPageB.click();
    return Page.waitForPage(PageB.class);
}