Closed myungs closed 12 years ago
It would be even better if there would be an Option element like in Watir, so: select_list = RAutomation::Window.new(:title => "MainFormWindow").select_list(:class => /COMBOBOX/i) select_list.option(:value => "Apple").selected? select_list.option(:value => "Apple").set
That API would make more sense to me than the current one. Although i'm not sure if it's possible to do something like that in the context of Windows controls.
We now have that option element Jarmo proposed
This seems to be implemented. Closing.
Method call for selecting an element in a select_list is poor.
Currently the spec is: it "#selected? & #select" do
select_list = RAutomation::Window.new(:title => "MainFormWindow").select_list(:class => /COMBOBOX/i) select_list.options(:text => "Apple")[0].should_not be_selected select_list.options(:text => "Apple")[0].select.should be_true select_list.options(:text => "Apple")[0].should be_selected end
Would prefer it work like the following it "#selected? & #select" do
select_list = RAutomation::Window.new(:title => "MainFormWindow").select_list(:class => /COMBOBOX/i) select_list.selected?("Apple").should_not be_true select_list.select("Apple").should be_true select_list.selected?("Apple").should be_true
set alias would also help for being able to, per request #11, loop over all sub-controls and call a generic #set