Skip to content

Instantly share code, notes, and snippets.

@vinchbr
Created November 23, 2016 22:19
Show Gist options
  • Save vinchbr/f689e2119517b61a831edbbc1f49f72f to your computer and use it in GitHub Desktop.
Save vinchbr/f689e2119517b61a831edbbc1f49f72f to your computer and use it in GitHub Desktop.
# if it was in ruby without the imports and all
driver = Selenium::WebDriver.for :firefox
user_data = [
{ :user => 'blabla', :password => 'blabla', :base_url => 'iam.fake'},
{ :user => 'blabl2a', :password => 'blabla2', :base_url => 'iam2.fake'}
]
user_data.each do |data|
driver.get(data[:base_url])
driver.find_element(:id, 'userInput').send_keys(data[:user])
driver.find_element(:id, 'passwordInput').send_keys(data[:password])
# do whatever assertion you want
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment