|
录制WINDONS通讯薄时 填加新用户
窗口属性会随之改变
姓:1 名:2
在WinRunner下就会是 "1 2 属性1"
请教这里该怎么编辑
table = "default.xls";
rc = ddt_open(table, DDT_MODE_READ);
if (rc!= E_OK && rc != E_FILE_OPEN)
pause("Cannot open table.");
ddt_get_row_count(table,table_RowCount);
for(table_Row = 1; table_Row <= table_RowCount; table_Row ++)
{
ddt_set_row(table,table_Row);
# 通讯簿 - 主标识
set_window ("通讯簿 - 主标识", 4);
menu_select_item ("文件(F);新建联系人(C)... Ctrl+N");
# noname (page)
set_window ("noname (page)", 31);
edit_set ("姓(L):", ddt_val(table,"z"));
edit_set ("名(F):", ddt_val(table,"yp"));
edit_set ("职务(T):", ddt_val(table,"s"));
edit_set ("昵称(N):", ddt_val(table,"hzz"));
obj_check_gui("添加(A)", "list1.ckl", "gui1", 6);
obj_check_gui("编辑(E)", "list2.ckl", "gui2", 1);
obj_check_gui("删除(R)", "list3.ckl", "gui3", 1);
obj_check_gui("设为默认值(S)", "list4.ckl", "gui4", 1);
set_window ("noname (page)", 16);
edit_set ("电子邮件地址(M):_0", ddt_val(table,"email"));
obj_check_gui("添加(A)", "list5.ckl", "gui5", 0);
set_window ("noname (page)", 5);
button_press ("添加(A)");
# 判断输入E-mail是否正确
if(win_exists("!.* 属性_1",2)==E_OK)
{
set_window ("!.* 属性_1", 0);
button_press ("否(N)");
# noname (page)
set_window("noname (page)", 2);
obj_check_gui("编辑(E)", "list13.ckl", "gui13", 1);
obj_check_gui("删除(R)", "list14.ckl", "gui14", 1);
obj_check_gui("设为默认值(S)", "list15.ckl", "gui15", 1);
set_window ("1 2 属性_2", 2);
button_press ("取消");
continue;
}
obj_check_gui("添加(A)", "list6.ckl", "gui6", 2);
obj_check_gui("编辑(E)", "list7.ckl", "gui7", 0);
obj_check_gui("删除(R)", "list8.ckl", "gui8", 1);
obj_check_gui("设为默认值(S)", "list9.ckl", "gui9", 1);
# z yp 属性
set_window ("z yp 属性", 12);
button_press ("确定");
}
ddt_close(table); |
|