Skip to content

Instantly share code, notes, and snippets.

@rodmatola
Created August 17, 2018 03:08
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 rodmatola/864224d2896d51dc692c1c10e6ee6bd3 to your computer and use it in GitHub Desktop.
Save rodmatola/864224d2896d51dc692c1c10e6ee6bd3 to your computer and use it in GitHub Desktop.
Given ("I am on the login screen") do
@login_page = LoginPage.new
@login_page.load
end
When ("I log in using {string}") do | user |
@login_page.user_field.set USER[user]
@login_page.password_field.set PASSWORD[user]
@login_page.btn_login.click
end
Then ("I should be directed to the main page") do
current_page_is?(NAMES['current_page'])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment