|
d=array("@","`","!","%","*")
For j=0 to 4
msgbox d(j)
wait 3
With Browser("欢迎使用 KJLINK CRM系统")
wait 3
With .Page("欢迎使用 KJLINK CRM系统")
wait 3
.WebEdit("tbxUserName").Set "admin"
.WebEdit("tbxPassword").SetSecure "471dc7c9c3addee5bea254a0"
.Image("ImgBtnLogin").Click 2,6
End With
.Page("Untitled Page").Link("我的任务").Click
.Page("Untitled Page_2").Image("ctl00$ContentPlaceHolder1$imgb").Click 11,8
With .Page("Untitled Page_3")
.WebList("ctl00$ContentPlaceHolder1$drop").Select "上级决定"
.WebList("ctl00$ContentPlaceHolder1$drop_2").Select "完成"
.Image("ctl00$ContentPlaceHolder1$imgb").Click 18,11
wait 3
Browser("Runtime Error").Back
msgbox"请将必填项输入完整",48,"必填项检查"
'Browser("Runtime Error").Page("Untitled Page")'.Sync
' .Image("ctl00$ContentPlaceHolder1$imgb_2").Click 33,6
'.Image("ctl00$ContentPlaceHolder1$imgb_2").Click 29,11
.WebEdit("ctl00$ContentPlaceHolder1$tbxB").Set "2007-10-12"
.Image("ctl00$ContentPlaceHolder1$imgb").Click 18,11
wait 3
Browser("Runtime Error").Back
msgbox"请将必填项输入完整",48,"必填项检查"
.WebEdit("ctl00$ContentPlaceHolder1$tbxE").Set "2007-10-15"
.WebEdit("ctl00$ContentPlaceHolder1$tbxN").Set "qq163"'DataTable("rwmc", dtGlobalSheet)
.WebList("ctl00$ContentPlaceHolder1$drop_3").Select "高"'DataTable("figng", dtGlobalSheet)
'string i = string.Empty
' c="我"
' for j=0 to 9
' i = i + c
' next
'textBox1.Text = i;
'.WebEdit("ctl00$ContentPlaceHolder1$tbxP").Set i
.WebEdit("ctl00$ContentPlaceHolder1$tbxR").Set d(j)'"qeqreqwrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr"
wait 3
.Image("ctl00$ContentPlaceHolder1$imgb").Click 18,11
.Image("ctl00$ContentPlaceHolder1$imgb_2").Click 33,6
.Image("ctl00$ContentPlaceHolder1$imgb_2").Click 29,11
End With
With .Page("Untitled Page_2")
wait 3
.WebList("ctl00$ContentPlaceHolder1$ddlC").Select "20"
'.Sync
Browser("欢迎使用 KJLINK CRM系统").Close
'wait 2
' wait 3
'.WebList("ctl00$ContentPlaceHolder1$ddlP").Select 2
' .Sync
wait 1
End With
End With
Next
-----------------------------------------------------------------------------------------------
我想检查-》添加“我的任务”页面中的某个输入框中输入我预先设定在数组中的非法字符,通过FOR循环第二、三。。。次循环登录后,添加“我的任务”页面中其他的输入项的输入值不变,要求对检查项循环输入(@,!,#,%,`)按顺序取一个值这样来检查每一个非法值在提交后页面有什么变化,但是我到了第二次循环就走不下去了,希望哪位大哥大姐帮帮小弟:在此谢过! |
|