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
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

  • 相关阅读:
    BZOJ2456: mode 众数卡空间
    BZOJ4128: Matrix 矩阵BSGS
    [SDOI2011]计算器 BSGS
    前台中文搜索到后台乱码
    批量删除实现js+springmvc
    基于Jquery+Ajax+Json实现分页显示
    分页条的制作
    input text中不能显示空格后的内容
    mysql存入中文乱码问题
    WEBROOT根目录 <%=request.getContextPath()%>
  • 原文地址:https://www.cnblogs.com/seniortestingdev/p/2307977.html
Copyright © 2011-2022 走看看