Skip to content

Instantly share code, notes, and snippets.

@ham1
Created August 5, 2016 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ham1/0d9a0f75cc05ba1bdb0cec8d51a2f32c to your computer and use it in GitHub Desktop.
Save ham1/0d9a0f75cc05ba1bdb0cec8d51a2f32c to your computer and use it in GitHub Desktop.
import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.pages.BasePage;
import org.openqa.selenium.WebElement;
public abstract class AbstractSomethingPage<T extends BasePage<T>> extends BasePage<T> {
@Visible
private WebElement foo;
public void doSomething() {
foo.clear();
}
}
@ham1
Copy link
Author

ham1 commented Aug 5, 2016

This can be used to better organise PageObjects which share common features but are also different.

To use this, do something like:

public class SubClassPage extends AbstractSomethingPage<SubClassPage> {

   // ...

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment