然后你就可以用 Notepad.Find. Up.Click()和 Notepad.Find.Down.Click()來控制 notepad的 查找方向了。
這里還有一點可能需要引起你的注意,如果 GUI上的 radio list控件經常變化的話,還是第一種方法較好,因為這樣你只需要更改測試腳本,而不需要重新捕捉和修改 inc文件中的定義。
[+] window DialogBox Find
[ ] tag "Find"
[+] parent Notepad
[+] StaticText FindWhatText
[+] multitag "Find what:"
[ ] "$65535"
[+] TextField FindWhat
[+] multitag "Find what:"
[ ] "$1152"
[+] CheckBox MatchCase
[+] multitag "Match case"
[ ] "$1041"
[+] StaticText DirectionText
[+] multitag "Direction"
[ ] "$1072"
[+] RadioButton Up
[+] multitag "Up"
[ ] "$1056"
[+] RadioButton Down
[+] multitag "Down"
[ ] "$1057"
[+] PushButton FindNext
[+] multitag "Find Next"
[ ] "$1"
[+] PushButton Cancel
[+] multitag "Cancel"
[ ] "$2"
文章來源于領測軟件測試網 http://www.kjueaiud.com/