Sha256: a3e92daa2d1add7b3e9bbfccf75d462bcb2fb35d5fb5ac21602a2972b1307fa7
Contents?: true
Size: 907 Bytes
Versions: 5
Compression:
Stored size: 907 Bytes
Contents
require 'spec_helper' describe "Win32::TextField", :if => SpecHelper.adapter == :win_32 do it "enabled/disabled" do RAutomation::Window.new(:title => "MainFormWindow").text_field(:index => 1).should be_enabled RAutomation::Window.new(:title => "MainFormWindow").text_field(:index => 1).should_not be_disabled end it "cannot set a value to a disabled text field" do lambda { RAutomation::Window.new(:title => "MainFormWindow").text_field.set "abc" }.should raise_error lambda { RAutomation::Window.new(:title => "MainFormWindow").text_field.clear }.should raise_error end it "#send_keys" do text_field = RAutomation::Window.new(:title => "MainFormWindow").text_field(:index => 1) text_field.send_keys "abc" text_field.value.should == "abc" text_field.send_keys [:control, "a"], :backspace text_field.value.should be_empty end end
Version data entries
5 entries across 5 versions & 1 rubygems