Created
May 9, 2011 13:39
-
-
Save andreastt/962531 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 'operawatir/helper' | |
describe 'OperaWatir' do | |
describe 'Browser' do | |
describe '#select_list' do | |
before :each do | |
browser.goto 'http://t/core/standards/wf1/interactive/button-type-reset-012.html' | |
@select_list = browser.select_list(:name, 'test') | |
@reset = browser.button(:name, 'reset') | |
end | |
it 'selects an option' do | |
@select_list.select 'bird' | |
@select_list.selected?('bird').should be_true | |
end | |
it 'selects multiple options' do | |
@select_list.select 'bird' | |
@select_list.select 'dog' | |
@select_list.selected?('bird').should be_true | |
@select_list.selected?('dog').should be_true | |
end | |
it 'selects options and resets form' do | |
@select_list.select 'bird' | |
@select_list.select 'dog' | |
@select_list.select 'fish' | |
@reset.click_no_wait | |
@select_list.selected?('cat').should be_true | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment