• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
    • 軟件測試技術
    • 軟件測試博客
    • 軟件測試視頻
    • 開源軟件測試技術
    • 軟件測試論壇
    • 軟件測試沙龍
    • 軟件測試資料下載
    • 軟件測試雜志
    • 軟件測試人才招聘
      暫時沒有公告

    字號: | 推薦給好友 上一篇 | 下一篇

    QTP的Run-time Object與Test Object 屬性之間的區別

    發布: 2008-5-28 21:54 | 作者: 網絡轉載 | 來源: 網絡轉載 | 查看: 552次 | 進入軟件測試論壇討論

    領測軟件測試網 用object spy查看測試對象時,有runtime object properties 和 test object properties兩種,那么它們有什么區別呢?

    從QTP的幫助文檔可以看出Run-time Object Properties與Test Object Properties之間的區別:

    (1)Run-time Object Properties / Run-time Object Methods  

    Displaysthe run-time (native) object properties or methods associated with theobject selected in the Object Spy's object hierarchy tree. Note thatthe label changes depending on whether the Properties or Methods tab isselected. You can use the Object property to retrieve or activaterun-time properties and methods displayed in the Object Spy. For moreinformation, see Retrieving Run-Time Object Properties and ActivatingRun-Time Object Methods.

    (2)Test Object Properties / Test Object Methods  

    Displaysthe test object properties or methods associated with the objectselected in the Object Spy's object hierarchy tree. Note that the labelchanges depending on whether the Properties or Methods tab is selected.You can use the GetTOProperty and SetTOProperty methods to retrieve andset the value of test object properties for test objects in your test.You can use the GetROProperty to retrieve the current property value ofobjects in your application during the run session. For moreinformation, see Retrieving and Setting Test Object Property Values.

    Run-time Object展現的是運行時本地測試對象的屬性或方法。在腳本中可以通過Object屬性來訪問和獲取Run-time Object的屬性或執行其方法。例如:

    Dim MyDay Set MyDay=Browser("index").Page("Untitled").ActiveX("MSCAL.Calendar.7").Object.Day

    下面的腳本則通過Object屬性執行測試對象的某個方法:

    Dim MyWebEdit Set MyWebEdit=Browser("Mercury Tours").Page("Mercury Tours").WebEdit("username").Object MyWebEdit.focus



    而對于Test Object則可通過GetTOProperty 和 SetTOProperty 來獲取或設置測試對象的屬性值。例如:

    Browser("QA Home Page").Page("QA Home Page").WebButton("Submit").SetTOProperty "Name", "my button"

    ButtonName=Browser("QA Home Page").Page("QA Home Page").WebButton("Submit").GetTOProperty("Name")

    下面的腳本通過GetROProperty訪問測試對象當前的屬性值:

    link_href = Browser("Mercury Technologies").Page("Mercury Technologies").Link("Jobs").GetROProperty("href")

    延伸閱讀

    文章來源于領測軟件測試網 http://www.kjueaiud.com/

    TAG: object qtp QTP test Test 屬性 Object


    關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
    版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
    北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備10010545號-5
    技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

    軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>