Skip to content

Instantly share code, notes, and snippets.

@O5ten
Created May 1, 2018 20:38
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 O5ten/46166fabf94c22a0a95f5145b29cdddd to your computer and use it in GitHub Desktop.
Save O5ten/46166fabf94c22a0a95f5145b29cdddd to your computer and use it in GitHub Desktop.
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