1.新建项目
File>new project>Classic Agent
File>new>test Frame>选中要录制的客户端如KeePass>OK
new script>save
2.确定测试步骤
testcase additem() appstate none
//active main windows
***.SetActive()
//click addentry btn
***.Click()
//wait the dialog
if addentry.Exists(3)
//input title
addentry.title.Setfocus()
***.SetText("***")
//input username
//input password
//repeat password
//input URL
//input notes
//click ok,close the dialog
else
LogError("***")
3.抓取GUI对象定义
Record>Window Declaration
鼠标放目标处 按住Ctrl+Alt暂停,点击copy to clipboard,然后粘贴到Frame文件中
4.找到对象的identifier(标识名,名称)
Record>Window identifier(快捷键ctrl+i)
定位后按ctrl+alt,点击copy to clipboard,然后粘贴到Script文件中
5.编写测试步骤代码
6.优化代码
7.调试,执行,改进
Run>compile all(编译)>按F9执行(全部执行)
执行时最小化窗口:Options>Runtime勾选最小化
ctrl+alt跳验证