然后你就可以用 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"
文章来源于领测软件测试网 https://www.ltesting.net/