So incorporating some of the parts of GuiTest into a new project (Wintir::Windows Automation In Ruby) I've started to assemble some simple windows object recognition.
http://rubyforge.org/projects/wintir/
An example of the script would be...
#Attach an exisiting calculator
com = Wintir::Com.attach("SciCalc","Calculator")
#Click the button "C" followed by "1"
com.button(:caption => "C", :name => "Button").click
com.button(:caption => "1", :name => "Button").click
#Change the menu option to Scientific
com.file_menu(:menu_path => "View>Scientific")
Another example...
#Open menu "Insert>Object"
com.file_menu(:menu_path => "Insert>Object")
#Return the result of a value, from a list box being displayed on a dialog
result = com.dialog(:dialog_name => "Date and Time").list_box(:name => "ListBox").find_string("11 December 2008")
The project is in its early but I've managed to at least release a first version which can be found...
http://rubyforge.org/frs/?group_id=7364
No comments:
Post a Comment