Skip to content

Instantly share code, notes, and snippets.

@tourdedave
Created February 10, 2016 20:13
Show Gist options
  • Save tourdedave/ee06907b99d39186e85f to your computer and use it in GitHub Desktop.
Save tourdedave/ee06907b99d39186e85f to your computer and use it in GitHub Desktop.
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