Popper Framework is a java framework which allows you to create PageObjects for your webapplication-tests in a declarative way. That means you just have to define an interface defining the structure of your website and add some annotation with the basic information like locators. PopperFramework will generate the implementation of that PageObject for you.

Key-Goal of PopperFramework is to allow you as a developer of sureface-tests to concentrate on your business => writing PageObjets and Tests, not wasting time by writing boilerplate code.

Popper Framework uses WebDriver-API to implement your PageObjects but its API is completly vendor-independent. So when there comes something better than WebDriver you change the implementation of PopperFramework and change to the vendor you need.

PopperFramework is highly configurable with a lot of hooks which allow you to customize PopperFramework behaviour to your needs.

Features

Example for a complete test using Popper Framework

@Page
public interface LoginSite {
  @PageAccessor(uri="/login.html")
  public void open();
  
  @Locator(xpath="//input[@name='username']")
  ITextBox usernameTextbox();

  @Locator(xpath="//input[@name='password']")
  ITextBox passwordTextbox();

  @Locator(cssSelector=".submitLoginButton")
  IButton submitLoginButton();

  @Locator(id="register")
  ILink registerLink();
}

public class LoginTest {
    protected IPoFactory factory;

    @Before
    public void setup() {
        WebdriverContext context = new WebdriverContext();
        context.getDefaultConfig().configureByPropertyfile("/test.config");
        factory = context.getFactory();
    }

    @Test
    public void testLogin() {
        LoginSite login = factory.createPage(LoginSite.class);
        login.open();
        login.usernameTextbox().type("Michael");
        login.passwordTextbox().type("secret");
        login.submitLoginButton().click();
    }
}