|
新手请教:
用WINRUNNER录制了一段:给手机下载(刷软件)的步骤,想根据最后以(下载成功)为依据来判断此次下载是PASS/FAIL,最后生成日志,并希望将此次PASS/FAIL 的结果和下载时间全部保存在一个文本文档里,供测试人分析。请各位前辈指教...
录制的脚本如下,请高人修改提示,谢谢!#循环
static i;
for(;;)
{
# Program Manager_1
set_window ("rogram Manager_1", 1);
list_activate_item ("SysListView32", "ÎҵĵçÄÔ");
# 打开我的电脑
set_window ("我的电脑_2", 10);
list_activate_item ("SysListView32", "±¾µØ´ÅÅÌ (D");
wait(2);
list_activate_item ("SysListView32", "¹¤¾ß");
wait(2);
list_select_item ("SysListView32", "3.1.0");
wait(2);
list_activate_item ("SysListView32", "3.1.0");
wait(2);
list_activate_item ("SysListView32", "DOWLOAD3.1.0;");
wait(2);
list_activate_item ("SysListView32", "DownloadTool;128 KB");
wait(2);
# Common downloader 3.1.0 打开下载工具
set_window ("Common downloader 3.1.0", 10);
button_press ("´ò¿ª...");
wait(2);
# ´选择下载工具里的驻留程序
set_window ("´ò¿ª", 30);
list_select_item ("²éÕÒ·¶Î§(I):_0", "×ÀÃæ"); # Item Number 1;
wait(2);
list_activate_item ("²éÕÒ·¶Î§(I):_1", "MC8331_LM8C311e");
wait(2);
# Common downloader 3.1.0 确定
set_window ("Common downloader 3.1.0", 10);
wait(2);
button_press ("´ò¿ª..._1");
wait(2);
# ´ò¿ª选择下载工具里的引导程序
set_window ("´ò¿ª", 10);
list_activate_item ("²éÕÒ·¶Î§(I):_1", "8331RAM_CODE_102");
wait(2);
# Common downloader 3.1.0 确定
set_window ("Common downloader 3.1.0", 10);
button_press ("´ò¿ª..._2");
wait(2);
# ´ò¿ª 确定
set_window ("´ò¿ª", 10);
list_activate_item ("²éÕÒ·¶Î§(I):_1", "8331BOOT_102");
wait(2);
# Common downloader 3.1.0 开始下载程序
set_window ("Common downloader 3.1.0", 5);
wait(2);
button_press ("¿ªÊ¼");
wait(2);
win_move ("Common downloader 3.1.0", 4, 91);
wait(2);
win_activate ("Common downloader 3.1.0");
wait(2);
win_move ("Common downloader 3.1.0", 10, 91);
wait(2);
win_move ("Common downloader 3.1.0", 10, 93);
wait(2);
wait (450) ;升级过程大概7分钟的样子,延时450秒后提示关闭此下载工具
win_close ("Common downloader 3.1.0");
想在这判断下载为PASS/FAIL,但不知如何判断,以上语句为下载成功的录制脚本。
# Ìáʾ 选择是 关闭下载工具
set_window ("Ìáʾ", 1);
button_press ("È·¶¨");
# DOWLOAD3.1.0 现在工具被关闭
win_close ("DOWLOAD3.1.0");
wait (30) ;
# save log,这段加进去没用,想在将下载PASS/FAIL 的信息保存成文本文件
db_write_records("8331_dowload","d:\\8331_dowload.txt",TRUE,5);
}
[ 本帖最后由 RORO_CULS 于 2008-8-14 10:04 编辑 ] |
|