12-15-2011, 03:37 PM
Hello QM Forum,
This is one amazing piece of software you guys have here! Ive been using it for while now and need some assistance. I am trying to write a macro that will be used for software regression testing. To start, i would like the macro to go through the entire program and list every accessible object in a tree style view (like windows explorer does). I have decided to start small, so im using the Windows Calculator since its such a small application and should be easy to test on.
Once i have a list of all buttons, i would like to run a macro that would click the buttons i need to do a simple math operation (ex. 12x5+40=) and then output the buttons that were clicked to a text file (12 x 5 + 40 =)
i have search and found some code examples on the forum and have this so far:
Macro
this would be exactly what i would like it to do, only i would like it to start from the highest parent level. What i would like to see in the end is the same results i get in the bottom output window of the "Find Accessible Objects" dialog after dragging the "DRAG" cross-hair over the outside border of Windows Calculator (capturing the entire application), then have the output send to a text file in a tree-style view.
Thanks for such a great program and the hours of help you provide everyone!
This is one amazing piece of software you guys have here! Ive been using it for while now and need some assistance. I am trying to write a macro that will be used for software regression testing. To start, i would like the macro to go through the entire program and list every accessible object in a tree style view (like windows explorer does). I have decided to start small, so im using the Windows Calculator since its such a small application and should be easy to test on.
Once i have a list of all buttons, i would like to run a macro that would click the buttons i need to do a simple math operation (ex. 12x5+40=) and then output the buttons that were clicked to a text file (12 x 5 + 40 =)
i have search and found some code examples on the forum and have this so far:
Macro
out ;;clear output
str saveTo = "$desktop$\output.txt"
str data
Acc a=acc("" "OUTLINE" win("My Computer" "ExploreWClass") "SysTreeView32" "" 0x1000) ;;captured with Find Accesible Object dialog
Acc a1
str s ss
a.Navigate("f" a1) ;;first item
rep
,s=a1.Name
,ss=a1.Value
,ss.set(9 0 val(ss))
,data.formata("%s%s[]" ss s)
,data.setfile(saveTo)
,a1.Navigate("n"); err break
this would be exactly what i would like it to do, only i would like it to start from the highest parent level. What i would like to see in the end is the same results i get in the bottom output window of the "Find Accessible Objects" dialog after dragging the "DRAG" cross-hair over the outside border of Windows Calculator (capturing the entire application), then have the output send to a text file in a tree-style view.
Thanks for such a great program and the hours of help you provide everyone!