Created
February 10, 2016 20:13
-
-
Save tourdedave/ee06907b99d39186e85f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class BasePage | |
def initialize(driver) | |
@driver = driver | |
driver.get ENV['base_url'] | |
end | |
def visit(url_path) | |
driver.get ENV['base_url'] + url_path | |
end | |
# ... | |
end | |
class LoginPage < BasePage | |
def initialize | |
super | |
visit('/login') | |
# this will visit the base_url and then the login page | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment