Sha256: bdcde55082bcd84b422ccfddad04ba1ca129478864d7801d4a53524308b3d38b
Contents?: true
Size: 1.62 KB
Versions: 1
Compression:
Stored size: 1.62 KB
Contents
require 'spec_helper' describe "WinFfi::Checkbox", :if => SpecHelper.adapter == :win_ffi do it "#checkbox" do RAutomation::Window.new(:title => "MainFormWindow").checkbox(:value => "checkBox").should exist RAutomation::Window.wait_timeout = 0.1 expect {RAutomation::Window.new(:title => "non-existing-window").checkbox(:value => "Something")}. to raise_exception(RAutomation::UnknownWindowException) end it "check for checkbox class" do RAutomation::Window.new(:title => "MainFormWindow").checkbox(:id => "textField").should_not exist end it "#set? & #set" do checkbox = RAutomation::Window.new(:title => "MainFormWindow").checkbox(:value => "checkBox") checkbox.should_not be_set checkbox.set checkbox.should be_set end it "#clear" do checkbox = RAutomation::Window.new(:title => "MainFormWindow").checkbox(:value => "checkBox") checkbox.set checkbox.should be_set checkbox.clear checkbox.should_not be_set end it "enabled/disabled" do RAutomation::Window.new(:title => "MainFormWindow").checkbox(:id => "checkBox").should be_enabled RAutomation::Window.new(:title => "MainFormWindow").checkbox(:id => "checkBox").should_not be_disabled RAutomation::Window.new(:title => "MainFormWindow").checkbox(:id => "checkBoxDisabled").should_not be_enabled RAutomation::Window.new(:title => "MainFormWindow").checkbox(:id => "checkBoxDisabled").should be_disabled end it "cannot check a disabled checkbox" do lambda { RAutomation::Window.new(:title => "MainFormWindow").checkbox(:id => "checkBoxDisabled").set }.should raise_error end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rdp-rautomation-0.6.3.1 | spec/adapter/win_ffi/checkbox_spec.rb |