Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Parent Page Object
public class Page {
private String url;
protected Actions actions;
private RemoteWebDriver browser;
public Page(String url) {
this.url = url;
}
public String getUrl(){
return url;
}
public void navigateTo(){
System.out.println("Navigating to " + getUrl());
this.browser.get(this.getUrl());
}
public void configure(RemoteWebDriver browser) {
this.browser = browser;
this.actions = new Actions(this.browser);
PageFactory.initElements(this.browser, this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment