Sha256: cca5508fb9d8b8bbdf5a46e8f2ed392b6c396daf4ba8b1ef4640bdcd80d7c483
Contents?: true
Size: 1.13 KB
Versions: 10
Compression:
Stored size: 1.13 KB
Contents
require File.expand_path('../../watirspec_desktophelper', __FILE__) require File.expand_path('../shared/shared', __FILE__) describe 'QuickDropdown' do before(:all) do browser.open_dialog_with_action("New Preferences Dialog", "Show preferences", 0).should > 0 end after(:all) do browser.close_all_tabs browser.close_all_dialogs end let(:widget) { browser.quick_dropdown(:name, "Startup_mode_dropdown") } subject { widget } it_behaves_like 'a widget' describe '#selected?'do it 'returns true for selected item' do browser.quick_dropdown(:name, "Startup_mode_dropdown").selected?("D_STARTUP_LAST_TIME").should be_true end it 'returns false for not selected item' do browser.quick_dropdown(:name, "Startup_mode_dropdown").selected?("D_STARTUP_SAVED_SESSIONS").should be_false end it 'raises an exception for not shown widget' do browser.close_all_dialogs expect { browser.quick_dropdown(:name, "Startup_mode_dropdown").selected?("D_STARTUP_SAVED_SESSIONS") }.to raise_error OperaWatir::DesktopExceptions::UnknownObjectException end end end
Version data entries
10 entries across 10 versions & 1 rubygems