Created
November 23, 2016 22:19
-
-
Save vinchbr/f689e2119517b61a831edbbc1f49f72f to your computer and use it in GitHub Desktop.
This file contains 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
# 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