Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find EVERY accessible object in an application
#1
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
Code:
Copy      Help
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!


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)