nixuewei 发表于 2012-10-19 09:30:22

我要把一个订单动态信息用描述性语表示出来

我要把一个订单动态信息用描述性语表示出来,就是那个0记录下来。用以下描述语言,为什么找不到

Set desc= Description.Create
desc("id").value="ctl00_ContentMain_lblOrderCount"
'"ctl00_ContentMain_lblOrderCount"
'ctl00_ContentMain_lbnNewOrderQuery
Set eleset=Browser("浏览器").Page("title:=Ebooking 酒店管理系统").ChildObjects(desc)
numcount=eleset.count
msgbox eleset
'msgbox numcount
numcount 总是0(不管id的value值是什么)

<div id="base_bd">
<div class="index_tools">
<span class="l">弹出通知:</span><a id="ctl00_ContentMain_lnkBtnPopUpOn" href="javascript:__doPostBack('ctl00$ContentMain$lnkBtnPopUpOn','')">开</a> <a id="ctl00_ContentMain_lnkBtnPopUpOff" class="current" href="javascript:__doPostBack('ctl00$ContentMain$lnkBtnPopUpOff','')">关</a>      
<span class="r">通知声音:</span><a id="ctl00_ContentMain_lnkBtnSoundOn" href="javascript:__doPostBack('ctl00$ContentMain$lnkBtnSoundOn','')">开</a> <a id="ctl00_ContentMain_lnkBtnSoundOff" class="current" href="javascript:__doPostBack('ctl00$ContentMain$lnkBtnSoundOff','')">关</a>
</div>
<div class="index_box" style="text-align:left">
<div class="index_box_tips">
<strong>未处理新订单:</strong> <a id="ctl00_ContentMain_lbnNewOrderQuery" href="javascript:__doPostBack('ctl00$ContentMain$lbnNewOrderQuery','')">
<strong>
<span id="ctl00_ContentMain_lblOrderCount">0</span></strong></a>条</div>
<ul class="index_box_info">
<li>未读留言: <a id="ctl00_ContentMain_lbnNewMessageQuery" href="javascript:__doPostBack('ctl00$ContentMain$lbnNewMessageQuery','')">
<strong>
<span id="ctl00_ContentMain_lblMessageCount">0</span></strong></a> 条</li>
<li>本周点评: <a id="ctl00_ContentMain_lbnFeedbackQuery" href="javascript:__doPostBack('ctl00$ContentMain$lbnFeedbackQuery','')">
<strong>
<span id="ctl00_ContentMain_lblFeedbackCount">1</span></strong></a> 条</li>
<li>未审核订单:<a id="ctl00_ContentMain_lbnAudit" href="javascript:__doPostBack('ctl00$ContentMain$lbnAudit','')"><strong><span id="ctl00_ContentMain_lblAudit">2</span></strong></a> 条 (<a id="ctl00_ContentMain_lbnAuditMessage" href="javascript:__doPostBack('ctl00$ContentMain$lbnAuditMessage','')"><strong><span id="ctl00_ContentMain_lblAuditMessage">0</span></strong></a> 条 留言)</li>
<li id="ctl00_ContentMain_liAudit">佣金结算:<a id="ctl00_ContentMain_hylAccState" href="/acceBooking/Check/Index.aspx">携程已确认</a>
(<a id="ctl00_ContentMain_hylUnreadMessage" href="/acceBooking/Check/Index.aspx">0</a>

nixuewei 发表于 2012-10-19 09:44:21

顶一下
就是
<strong>未处理新订单:</strong> <a id="ctl00_ContentMain_lbnNewOrderQuery" href="javascript:__doPostBack('ctl00$ContentMain$lbnNewOrderQuery','')">

<strong>

<span id="ctl00_ContentMain_lblOrderCount">0</span></strong></a>条</div>

<ul class="index_box_info">
中的那个0条,试了很多方法,都找不到,本人新手,望有经验的大哥指教

云层 发表于 2012-10-19 11:37:02

用obj spy扫了之后看过滤属性

wubob205 发表于 2012-10-19 11:44:41

不懂,呵呵帮你顶下贴

nixuewei 发表于 2012-10-19 13:35:48

回复 3# 云层


    id不一样就可以唯一确认到这个空间,为什么QTP找不到
页: [1]
查看完整版本: 我要把一个订单动态信息用描述性语表示出来