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

  • 相关阅读:
    nginx安装:linux环境下安装包安装
    Effective C++
    Win32 Msg
    C++ 17
    Win32 Threads
    Exceptional C++
    C++11
    STL 分类
    C++类型转换
    红黑树
  • 原文地址:https://www.cnblogs.com/seniortestingdev/p/2307977.html
Copyright © 2011-2022 走看看