Skip to content

Instantly share code, notes, and snippets.

@rubemz
Created September 9, 2011 03:19
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 rubemz/1205414 to your computer and use it in GitHub Desktop.
Save rubemz/1205414 to your computer and use it in GitHub Desktop.
Graph
class Home < Page
element :login_button, {'...'}
link :login_button,:to => LoginPage #click as default action or you can specify :action => :mouseover
def login
login_button.click
end
end
class Login < Page
element :username, {'...'}
element :password, {'...'}
element :submit, {'...'}
link :submit, :to => AccountPage
end
class Account < Page
"..."
end
class Login < flow
:entry => HomePage
def login_as_admin
entry.login do |login_page|
login_page.username "joao"
login_page.password "xxx"
login_page.submit. do |account_page|
"..."
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment