function checkfilter(objChildobjects,strInputContent,filtestr)
dim i
i=0
do while i<objChildobjects.count
if objChildobjects(i).geroproperty("micclass")="webeidt" and objChildobjects(i).geroproperty("text")="回帖编辑框" then '类似这样判断 因为不知道LZ的具体测试对象
Childobjects(i).set strInputContent
i=0
do while i<objChildobjects.count
if objChildobjects(i).geroproperty("micclass")="webbutton" and objChildobjects(i).geroproperty("text")="发表回复" then
objChildobjects(i).click
exit do
end if
i=i+1
loop
exit do
end if
i=i+1
loop
dim getstr
getstr=""
i=0
do while i<objChildobjects.count
if objChildobjects(i).geroproperty("micclass")="webeidt" and objChildobjects(i).geroproperty("text")="显示区域" then
getstr= objChildobjects(i).geroproperty("text")
exit do
end if
i=i+1
loop
'以上假设所有操作对象均存在
if not instr(getstr,filtestr,1) then
checkfilter=1
else
checkfilter=0
end if
end function作者: db_qtp 时间: 2012-3-17 18:32 回复 3#正在更新