|
如图question,
问题描述:我每次点击1(+体)都会产生2(产生新的体),我怎样用QTP来验证例如我点击n次1,产生n次2?
再提供一些信息:Browser("SkillBase 4.0 ").Page("SkillBase 4.0 ").WebElement("试题题干---多选单选填空简答匹配 无标准答案有标准答").GetROProperty("outerhtml")
id=store_body_X 每增加一个+体,X的值增大,我本想取出这个值做验证的依据,可又不知道怎么取出?也不知我的这种验证方法思路是否正确。
请各位给些意见,在线等!
先谢谢了!
outerhtml的内容:
<DIV class="tbFormElement leftPosition" id=ele_null style="WIDTH: 800px"><LABEL class=tbLabel style="WIDTH: 100px">
<SPAN class=labelIndent> </SPAN></LABEL><DIV class="tbFieldWrap tbElementWrapper" ?>
<DIV id=main><DIV class=store_body_even id=store_body_0 title=1><TABLE width=600><TBODY><TR><TD width="35%"><TEXTAREA disabled name=mbcTa>试题题干</TEXTAREA></TD><TD><INPUT id=mbcAddBody_0 onclick=addBody(),buttonState($(this),0) type=button value=+体>
<INPUT id=AddBodyPart_0 disabled onclick=proAddPart(0),buttonState($(this),0) type=button value=+项><SELECT id=selector_0 disabled onchange='buttonState($(this),"0")'><OPTION value=0 selected>---</OPTION><OPTION value=1>多选</OPTION><OPTION value=2>单选</OPTION><OPTION value=3>填空</OPTION><OPTION value=5>简答</OPTION><OPTION value=6>匹配</OPTION></SELECT></TD></TR><TR><TD colSpan=2><SPAN onmouseover='this.style.cursor="help"' style="BACKGROUND: url(/skillbase4/css/base/ctax/PNG8/tb_description.png); WIDTH: 100px" onclick=showDesc(1); onmouseout=default> </SPAN><SELECT id=has_0><OPTION value=0 selected>无标准答案</OPTION><OPTION value=1>有标准答案</OPTION></SELECT><SPAN onmouseover='this.style.cursor="help"' style="BACKGROUND: url(/skillbase4/css/base/ctax/PNG8/tb_description.png); WIDTH: 100px" onclick=showDesc(2); onmouseout=default> </SPAN><SELECT id=ifvisible_0><OPTION value=0 selected>不显示题干</OPTION><OPTION value=1>显示题干</OPTION></SELECT><SPAN onmouseover='this.style.cursor="help"' style="BACKGROUND: url(/skillbase4/css/base/ctax/PNG8/tb_description.png); WIDTH: 100px" onclick=showDesc(3); onmouseout=default> </SPAN>小题比重:<INPUT onbeforepaste="value=value.replace(/[^\d]/g,'')" id=rate_0 onkeyup="value=value.replace(/[^\d]/g,'') " disabled maxLength=3 size=3 value=0>% <SPAN onmouseover='this.style.cursor="help"' style="BACKGROUND: url(/skillbase4/css/base/ctax/PNG8/tb_description.png); WIDTH: 100px" onclick=showDesc(4); onmouseout=default> </SPAN><SELECT id=ciraSelect_0 disabled onchange=showChange($(this),0)><OPTION value=0 selected>完全匹配</OPTION><OPTION value=1>不完全匹配</OPTION><OPTION value=2>自定义</OPTION></SELECT><SPAN id=cira_0 style="DISPLAY: none">答不全给分比重:<INPUT onbeforepaste="value=value.replace(/[^\d]/g,'')" id=ciratext_0 onkeyup="value=value.replace(/[^\d]/g,'') " disabled maxLength=3 size=3>%
</SPAN></TD></TR></TBODY>
</TABLE><DIV id=bodyPartsDiv_0></DIV></DIV><DIV id=addition>
<DIV class=store_body_even id=store_body_1 title=1>
<TABLE width=500><TBODY><TR><TD width="5%"><SPAN>◆</SPAN></TD><TD width="35%"><TEXTAREA disabled name=mbcTa_0>试题题干</TEXTAREA></TD><TD><INPUT id=MinusBody_0 onclick="buttonState($(this),-1),minBody('store_body_1')" type=button value=-体><INPUT id=AddBodyPart_1 disabled onclick=proAddPart(1),buttonState($(this),1) type=button value=+项><SELECT id=selector_1 onchange='buttonState($(this),"1")'><OPTION value=0 selected>---</OPTION><OPTION value=1>多选</OPTION><OPTION value=2>单选</OPTION><OPTION value=3>填空</OPTION><OPTION value=5>简答</OPTION><OPTION value=6>匹配</OPTION></SELECT></TD></TR><TR><TD width="5%"><SPAN style="DISPLAY: none"></SPAN></TD><TD colSpan=2><SELECT id=has_1 style="DISPLAY: none"><OPTION value=0 selected>无标准答案</OPTION><OPTION value=1>有标准答案</OPTION></SELECT>小题比重:<INPUT onbeforepaste="value=value.replace(/[^\d]/g,'')" id=rate_1 onkeyup="value=value.replace(/[^\d]/g,'') " maxLength=3 size=3>% <SELECT id=ciraSelect_1 onchange=showChange($(this),1)><OPTION value=0 selected>完全匹配</OPTION><OPTION value=1>不完全匹配</OPTION><OPTION value=2>自定义</OPTION></SELECT><SPAN id=cira_1 style="DISPLAY: none">答不全给分比重:<INPUT onbeforepaste="value=value.replace(/[^\d]/g,'')" id=ciratext_1 onkeyup="value=value.replace(/[^\d]/g,'') " maxLength=3 size=3>%</SPAN></TD></TR></TBODY></TABLE><DIV id=bodyPartsDiv_1></DIV><DIV></DIV></DIV></DIV><DIV id=store_body style="DISPLAY: none"><TEXTAREA name=mbcTa_0></TEXTAREA><P></P><INPUT onclick=minBody(bodyNameForReplace) type=button value=-体 name=MinusBody_0><INPUT onclick=addPart(1,bnForReplace) type=button value=+项 name=AddBodyPart_0><SELECT id=mbcQtype onchange=active(this.options[this.options.selectedIndex].value,0)><OPTION value=0 selected>---</OPTION><OPTION value=1>select1</OPTION><OPTION value=2>select2</OPTION></SELECT><DIV id=bodyPartsDiv_bnForReplace></DIV></DIV></DIV></DIV></DIV> |
|