51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1829|回复: 2
打印 上一主题 下一主题

[原创] 想了很多天了,还是无法解决,求助!

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-11-21 10:31:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
场景描述:有多个学校,考试中心分配给每个学校一个帐号,学校负责人通过这个帐号增加考生的报考记录,报考成功后打印每个考生打印一份报名表,下面是单个学校负责人登陆后选择15条考生记录进行批量打印的脚本,请问如何处理以下脚本,才可以实现多个模拟学校负责人进行批量打印?

#include "web_api.h"


Action()
{

        web_url("NetService",
                "URL=http://192.0.0.111:7001/gd-eams/NetService",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=NetService/images/bg.gif", "Referer=http://192.0.0.111:7001/gd-eams/NetService/", ENDITEM,
                "Url=NetService/Images/index/topbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/NetService/", ENDITEM,
                "Url=NetService/Images/index/copyrigh.jpg", "Referer=http://192.0.0.111:7001/gd-eams/NetService/", ENDITEM,
                LAST);

        web_image("aa02.jpg",
                "Src=/gd-eams/NetService/Images/index/aa02.jpg",
                "Snapshot=t2.inf",
                EXTRARES,
                "Url=images/bg.gif", "Referer=http://192.0.0.111:7001/gd-eams/NetService/index.jsp?functionId=020", ENDITEM,
                "Url=Images/index/topbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/NetService/index.jsp?functionId=020", ENDITEM,
                "Url=Images/index/leftbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/NetService/index.jsp?functionId=020", ENDITEM,
                "Url=Images/index/anbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/NetService/index.jsp?functionId=020", ENDITEM,
                "Url=Images/index/copyrigh.jpg", "Referer=http://192.0.0.111:7001/gd-eams/NetService/index.jsp?functionId=020", ENDITEM,
                LAST);

        web_url("threeMenu.jsp",
                "URL=http://192.0.0.111:7001/gd-eams/NetService/Layout/threeMenu.jsp?functionId=020&&functionName=初级会计电算化考试&&threeMenuId=020020",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.0.0.111:7001/gd-eams/NetService/index.jsp?functionId=020",
                "Snapshot=t3.inf",
                "Mode=HTML",
                LAST);

        web_link("团体报名打印受理单",
                "Text=团体报名打印受理单",
                "Snapshot=t4.inf",
                EXTRARES,
                "Url=/gd-eams/NetService/Images/index/topbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/NetService/ExternService/Apply/Apply_Group_selectExam.jsp?examType=SkillExam&&examLevel=PrimaryLevel&&operation=Print&isNewSign=true", ENDITEM,
                LAST);

        web_submit_data("WebGroupSignManageAction.do",
                "Action=http://192.0.0.111:7001/gd-eams/Actions/Net/External/NetService/WebGroupSignManageAction.do?method=enterGroupSelectExam",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.0.0.111:7001/gd-eams/NetService/ExternService/Apply/Apply_Group_selectExam.jsp?examType=SkillExam&&examLevel=PrimaryLevel&&operation=Print&isNewSign=true",
                "Snapshot=t5.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=examSignManageVO.examTypeId", "Value=SkillExam", ENDITEM,
                "Name=examSignManageVO.levelId", "Value=PrimaryLevel", ENDITEM,
                "Name=examSignManageVO.adminPid", "Value=5858C07F-8DF4-C555-300C-8DE16D8975A9", ENDITEM,
                "Name=operation", "Value=Print", ENDITEM,
                "Name=examType", "Value=SkillExam", ENDITEM,
                "Name=examLevel", "Value=PrimaryLevel", ENDITEM,
                "Name=examSignManageVO.signNodePid", "Value=ED108F27-7EEF-E37D-4E76-1A983B33F34A", ENDITEM,
                "Name=examSignManageVO.examMainPid", "Value=", ENDITEM,
                EXTRARES,
                "Url=/gd-eams/NetService/Images/index/topbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/Actions/Net/External/NetService/WebGroupSignManageAction.do?method=enterGroupSelectExam", ENDITEM,
                LAST);

        web_submit_form("WebGroupSignManageAction.do_2",
                "Snapshot=t6.inf",
                ITEMDATA,
                "Name=examSignManageVO.signNodePid", "Value=01 广东省考试中心", ENDITEM,
                "Name=examSignManageVO.examMainPid", "Value=语文", ENDITEM,
                EXTRARES,
                "Url=/gd-eams/NetService/Images/index/topbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/Actions/Net/External/NetService/WebGroupSignManageAction.do?method=enterGroupExamNotice", ENDITEM,
                LAST);

        web_submit_data("Apply_Login.jsp",
                "Action=http://192.0.0.111:7001/gd-eams/NetService/ExternService/Apply/Apply_Login.jsp?group=true",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.0.0.111:7001/gd-eams/Actions/Net/External/NetService/WebGroupSignManageAction.do?method=enterGroupExamNotice",
                "Snapshot=t7.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=examType", "Value=SkillExam", ENDITEM,
                "Name=examLevel", "Value=PrimaryLevel", ENDITEM,
                "Name=examMainPid", "Value=02CC8625-7930-437C-92FB-DBA8FE4C5787", ENDITEM,
                "Name=adminPid", "Value=5858C07F-8DF4-C555-300C-8DE16D8975A9", ENDITEM,
                "Name=signNodePid", "Value=ED108F27-7EEF-E37D-4E76-1A983B33F34A", ENDITEM,
                "Name=operation", "Value=Print", ENDITEM,
                "Name=notice", "Value=团体报名须知", ENDITEM,
                EXTRARES,
                "Url=/gd-eams/NetService/Images/index/topbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/NetService/ExternService/Apply/Apply_Login.jsp?group=true", ENDITEM,
                LAST);

        lr_think_time( 14 );



        /*
         * 不同的用户登陆
         */

        web_submit_form("WebUserLoginAction.do",
                "Snapshot=t8.inf",
                ITEMDATA,
                "Name=userID", "Value=999", ENDITEM,
                "Name=userPwd", "Value=999", ENDITEM,
                "Name=cmd_next", "Value=提交", ENDITEM,
                EXTRARES,
                "Url=/gd-eams/NetService/Images/index/topbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/Actions/Net/Internal/WebUserLoginAction.do?method=signLoginOn", ENDITEM,
                LAST);

        lr_think_time( 2 );

        web_submit_form("WebGroupSignManageAction.do_3",
                "Snapshot=t9.inf",
                ITEMDATA,
                "Name=signManageVO.examMainPid", "Value=语文", ENDITEM,
                "Name=signManageVO.signNodePid", "Value=01 广东省考试中心", ENDITEM,
                "Name=signManageVO.accountantName", "Value=", ENDITEM,
                "Name=queryCertId", "Value=999", ENDITEM,
                "Name=signManageVO.signBeginDate", "Value=", ENDITEM,
                "Name=signManageVO.signEndDate", "Value=", ENDITEM,
                "Name=selectAllCheckBox", "Value=<OFF>", ENDITEM,
                "Name=cmd_query", "Value=查询", ENDITEM,
                EXTRARES,
                "Url=/gd-eams/NetService/Images/index/topbj.jpg", "Referer=http://192.0.0.111:7001/gd-eams/Actions/Net/External/NetService/WebGroupSignManageAction.do?method=selectSignData&query=true", ENDITEM,
                LAST);


        /*
         * 选择多个考生记录进行打印
         */

        web_submit_data("R_Web_Sign_Groups_Print.jsp",
                "Action=http://192.0.0.111:7001/gd-eams/NetService/ExternService/Apply/R_Web_Sign_Groups_Print.jsp",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.0.0.111:7001/gd-eams/Actions/Net/External/NetService/WebGroupSignManageAction.do?method=selectSignData&query=true",
                "Snapshot=t10.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=examSignManageVO.examTypeId", "Value=SkillExam", ENDITEM,
                "Name=examSignManageVO.levelId", "Value=PrimaryLevel", ENDITEM,
                "Name=examSignManageVO.examDate", "Value=", ENDITEM,
                "Name=examMainPid", "Value=02CC8625-7930-437C-92FB-DBA8FE4C5787", ENDITEM,
                "Name=operation", "Value=Print", ENDITEM,
                "Name=webAccountantVO.account", "Value=999", ENDITEM,
                "Name=signManageVO.adminPid", "Value=5858C07F-8DF4-C555-300C-8DE16D8975A9", ENDITEM,
                "Name=signManageVO.examMainPid", "Value=02CC8625-7930-437C-92FB-DBA8FE4C5787", ENDITEM,
                "Name=signManageVO.signNodePid", "Value=ED108F27-7EEF-E37D-4E76-1A983B33F34A", ENDITEM,
                "Name=signManageVO.accountantName", "Value=", ENDITEM,
                "Name=queryCertId", "Value=999", ENDITEM,
                "Name=signManageVO.signBeginDate", "Value=", ENDITEM,
                "Name=signManageVO.signEndDate", "Value=", ENDITEM,
                "Name=selectAllCheckBox", "Value=on", ENDITEM,
                "Name=pkCheckBoxs", "Value=0F6F76A4-4FE3-FED7-2FC3-9C51A335CA30", ENDITEM,
                "Name=pkCheckBoxs", "Value=311AEA70-4587-E4D9-3C7D-870AD559B637", ENDITEM,
                "Name=pkCheckBoxs", "Value=99ABAC4B-39D7-7A4C-45B4-EA9D837E5C19", ENDITEM,
                "Name=pkCheckBoxs", "Value=7C8F99F4-464F-2177-036A-802B82329E08", ENDITEM,
                "Name=pkCheckBoxs", "Value=F8809371-D91A-5C58-37D8-F09D6355472B", ENDITEM,
                "Name=pkCheckBoxs", "Value=BAB409A2-B484-FAC8-A8BA-567680BADA2D", ENDITEM,
                "Name=pkCheckBoxs", "Value=56B9BEF1-69BC-9CDF-381D-24B13823756C", ENDITEM,
                "Name=pkCheckBoxs", "Value=27310734-6173-3438-B517-DE7506FED9CE", ENDITEM,
                "Name=pkCheckBoxs", "Value=0D988338-AA59-9BE0-E3D6-2DF79F6DF442", ENDITEM,
                "Name=pkCheckBoxs", "Value=E1D85B84-F04D-FDFD-3D17-31F6E1BB6F61", ENDITEM,
                LAST);

        return 0;
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2007-11-21 10:33:09 | 只看该作者
"Name=pkCheckBoxs", "Value=0F6F76A4-4FE3-FED7-2FC3-9C51A335CA30", ENDITEM,
                "Name=pkCheckBoxs", "Value=311AEA70-4587-E4D9-3C7D-870AD559B637", ENDITEM,
                "Name=pkCheckBoxs", "Value=99ABAC4B-39D7-7A4C-45B4-EA9D837E5C19", ENDITEM,
                "Name=pkCheckBoxs", "Value=7C8F99F4-464F-2177-036A-802B82329E08", ENDITEM,
                "Name=pkCheckBoxs", "Value=F8809371-D91A-5C58-37D8-F09D6355472B", ENDITEM,
                "Name=pkCheckBoxs", "Value=BAB409A2-B484-FAC8-A8BA-567680BADA2D", ENDITEM,
                "Name=pkCheckBoxs", "Value=56B9BEF1-69BC-9CDF-381D-24B13823756C", ENDITEM,
                "Name=pkCheckBoxs", "Value=27310734-6173-3438-B517-DE7506FED9CE", ENDITEM,
                "Name=pkCheckBoxs", "Value=0D988338-AA59-9BE0-E3D6-2DF79F6DF442", ENDITEM,
                "Name=pkCheckBoxs", "Value=E1D85B84-F04D-FDFD-3D17-31F6E1BB6F61", ENDITEM,

这个是所选择考生的主键ID,data wizard里如何传递学校帐号,然后通过这个帐号查询对应的考生记录呢?
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2007-11-21 17:51:39 | 只看该作者
dddddddddddddddddddddd
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-9 01:40 , Processed in 0.073884 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表