Created
July 24, 2014 17:20
-
-
Save tourdedave/9ea9b360a914e319604f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'selenium-webdriver' | |
describe 'Login' do | |
before(:each) do | |
@driver = Selenium::WebDriver.for :firefox | |
end | |
after(:each) do | |
@driver.quit | |
end | |
it 'succeeded' do | |
@driver.get 'http://the-internet.herokuapp.com/login' | |
@driver.find_element(id: 'username').send_keys('tomsmith') | |
@driver.find_element(id: 'password').send_keys('SuperSecretPassword!') | |
@driver.find_element(id: 'login').submit | |
expect(@driver.find_element(css: '.flash.success').displayed?).to eql(true) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment