51Testing软件测试论坛

标题: 我要把一个订单动态信息用描述性语表示出来 [打印本页]

作者: nixuewei    时间: 2012-10-19 09:30
标题: 我要把一个订单动态信息用描述性语表示出来
我要把一个订单动态信息用描述性语表示出来,就是那个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值是什么)

  1. <div id="base_bd">
  2. <div class="index_tools">
  3. <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>        
  4. <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>
  5. </div>
  6. <div class="index_box" style="text-align:left">
  7. <div class="index_box_tips">
  8. <strong>未处理新订单:</strong> <a id="ctl00_ContentMain_lbnNewOrderQuery" href="javascript:__doPostBack('ctl00$ContentMain$lbnNewOrderQuery','')">
  9. <strong>
  10. <span id="ctl00_ContentMain_lblOrderCount">0</span></strong></a>条</div>
  11. <ul class="index_box_info">
  12. <li>未读留言: <a id="ctl00_ContentMain_lbnNewMessageQuery" href="javascript:__doPostBack('ctl00$ContentMain$lbnNewMessageQuery','')">
  13. <strong>
  14. <span id="ctl00_ContentMain_lblMessageCount">0</span></strong></a> 条</li>
  15. <li>本周点评: <a id="ctl00_ContentMain_lbnFeedbackQuery" href="javascript:__doPostBack('ctl00$ContentMain$lbnFeedbackQuery','')">
  16. <strong>
  17. <span id="ctl00_ContentMain_lblFeedbackCount">1</span></strong></a> 条</li>
  18. <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>
  19. <li id="ctl00_ContentMain_liAudit">佣金结算:<a id="ctl00_ContentMain_hylAccState" href="/acceBooking/Check/Index.aspx">携程已确认</a>
  20. (<a id="ctl00_ContentMain_hylUnreadMessage" href="/acceBooking/Check/Index.aspx">0</a>
复制代码

作者: nixuewei    时间: 2012-10-19 09:44
顶一下
就是
<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
用obj spy扫了之后看过滤属性
作者: wubob205    时间: 2012-10-19 11:44
不懂,呵呵帮你顶下贴
作者: nixuewei    时间: 2012-10-19 13:35
回复 3# 云层


    id不一样就可以唯一确认到这个空间,为什么QTP找不到




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2