zoukankan      html  css  js  c++  java
  • QTP的那些事采用DOM,描述性编程获取指定的对象

    
    testrow=Browser("testip").Page("【testpage").Frame("mainFrame0_2").WebTable("testtable").GetRowWithCellText("a111230122")
    print "order list id"&cstr(testrow)
    Set des=description.Create()
    des("micclass").value="WebButton"
    'des("xpath").value="/html/body/div/div[2]/div[3]/table/tbody/tr[2]/td[11]/input"
    set alist=Browser("testip").Page("【testpage").ChildObjects(des)
    
    b=alist.count
    print b
    counted=0
    For i=0 to b-1
         If alist(i).getroproperty("value")="购买" then 
             counted=counted+1
             If counted=(testrow-2) Then
                 alist(i).click
             End If
        '     print "test id:"&cstr(counted)
    
        end if
    Next
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    作者:高级测试开发网
    博客地址:https://seniortesting.club
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

  • 相关阅读:
    (10)进程---Manager数据共享
    (9)进程---JoinableQueue队列
    (8)进程---Queue队列
    (7)Pool进程池
    (6)进程---Event事件
    (5)进程--锁和信号量
    (4)进程---daemon守护进程和join阻塞
    XSLT知识点【一】
    XSL-FO知识点【一】
    XPath知识点【一】
  • 原文地址:https://www.cnblogs.com/seniortestingdev/p/2307977.html
Copyright © 2011-2022 走看看