TA的每日心情 | 慵懒 2016-12-12 16:02 |
---|
签到天数: 52 天 连续签到: 1 天 [LV.5]测试团长
|
1测试积点
用qtp12 录制登录脚本之后回放,回放的时候自动填写了用户名,但是提交的时候却提示用户名为空。
录制的是自己公司的web前端,听开发说他们用的swt框架,他用火狐浏览器中的开发者帮我看了一下,
发现,脚本填写的用户名没有传递参数到服务器,但是手工填写的就可以传递参数到服务端。
我用syp对象识别器识别了系统中好几个文本框,属性如下
"Class Name:=WebEdit",
"abs_x:=626",
"abs_y:=345",
"class:=",
"default value:=",
"disabled:=0",
"height:=18",
"html id:=",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=10",
"name:=WebEdit",
"outerhtml:=<input type=""text"" style=""position: absolute; padding: 0px 1px 0px 0px; margin: 0px; border: 0px none; background: none repeat scroll 0% 0% transparent; overflow: hidden; outline: medium none; resize: none; -moz-appearance: none; font-family: Verdana,""Lucida Sans"",Arial,Helvetica,sans-serif; font-size: 14px; font-weight: normal; font-style: normal; color: rgb\(74, 74, 74\); width: 176px; top: 1px;"" autocomplete=""off"" maxlength=""10"">",
<input type="text" style="position: absolute; padding: 0px 1px 0px 0px; margin: 0px; border: 0px none; background: none repeat scroll 0% 0% transparent; overflow: hidden; outline: medium none; resize: none; -moz-appearance: none; font-family: Verdana,"Lucida Sans",Arial,Helvetica,sans-serif; font-size: 14px; font-weight: normal; font-style: normal; color: rgb(74, 74, 74); width: 176px; top: 1px;" autocomplete="off" maxlength="10">
"outertext:=",
"pattern:=",
"placeholder:=",
"readonly:=0",
"required:=False",
"rows:=0",
"title:=",
"type:=text",
"value:=",
"visible:=True",
"width:=176",
"width in characters:=20",
"x:=626",
"xpath:=",
"y:=255"
"Class Name:=WebEdit",
"abs_x:=626",
"abs_y:=389",
"class:=",
"default value:=",
"disabled:=0",
"height:=18",
"html id:=",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=6",
"name:=WebEdit",
"outerhtml:=<input type=""text"" style=""position: absolute; padding: 0px 1px 0px 0px; margin: 0px; border: 0px none; background: none repeat scroll 0% 0% transparent; overflow: hidden; outline: medium none; resize: none; -moz-appearance: none; font-family: Verdana,""Lucida Sans"",Arial,Helvetica,sans-serif; font-size: 14px; font-weight: normal; font-style: normal; color: rgb\(74, 74, 74\); width: 176px; top: 1px;"" autocomplete=""off"" maxlength=""6"">",
"outertext:=",
"pattern:=",
"placeholder:=",
"readonly:=0",
"required:=False",
"rows:=0",
"title:=",
"type:=text",
"value:=",
"visible:=True",
"width:=176",
"width in characters:=20",
"x:=626",
"xpath:=",
"y:=299"
"Class Name:=WebEdit",
"abs_x:=626",
"abs_y:=433",
"class:=",
"default value:=",
"disabled:=0",
"height:=18",
"html id:=",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=6",
"name:=WebEdit",
"outerhtml:=<input type=""password"" style=""position: absolute; padding: 0px 1px 0px 0px; margin: 0px; border: 0px none; background: none repeat scroll 0% 0% transparent; overflow: hidden; outline: medium none; resize: none; -moz-appearance: none; font-family: Verdana,""Lucida Sans"",Arial,Helvetica,sans-serif; font-size: 14px; font-weight: normal; font-style: normal; color: rgb\(74, 74, 74\); width: 176px; top: 1px;"" autocomplete=""off"" maxlength=""6"">",
"outertext:=",
"pattern:=",
"placeholder:=",
"readonly:=0",
"required:=False",
"rows:=0",
"title:=",
"type:=password",
"value:=",
"visible:=True",
"width:=176",
"width in characters:=20",
"x:=626",
"xpath:=",
"y:=343"
"Class Name:=WebEdit",
"abs_x:=626",
"abs_y:=345",
"class:=",
"default value:=",
"disabled:=0",
"height:=18",
"html id:=",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=10",
"name:=WebEdit",
"outerhtml:=<input type=""text"" style=""position: absolute; padding: 0px 1px 0px 0px; margin: 0px; border: 0px none; background: none repeat scroll 0% 0% transparent; overflow: hidden; outline: medium none; resize: none; -moz-appearance: none; font-family: Verdana,""Lucida Sans"",Arial,Helvetica,sans-serif; font-size: 14px; font-weight: normal; font-style: normal; color: rgb\(74, 74, 74\); width: 176px; top: 1px;"" autocomplete=""off"" maxlength=""10"">",
"outertext:=",
"pattern:=",
"placeholder:=",
"readonly:=0",
"required:=False",
"rows:=0",
"title:=",
"type:=text",
"value:=",
"visible:=True",
"width:=176",
"width in characters:=20",
"x:=626",
"xpath:=",
"y:=255"
除了红色部分,其他的地方都是一样的,
有人遇到同样的问题么,怎么解决的?求解答。。
|
最佳答案
查看完整内容
叫开发把这几个东西的ID补上,你再录制一次试下。
或是自己写脚本用描述性编程试试。。。。
|