Created
May 1, 2018 20:38
-
-
Save O5ten/46166fabf94c22a0a95f5145b29cdddd to your computer and use it in GitHub Desktop.
Parent Page Object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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