<ruby id="h6500"><table id="h6500"></table></ruby>
    1. <ruby id="h6500"><video id="h6500"></video></ruby>
          1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>
            • 軟件測試技術(shù)
            • 軟件測試博客
            • 軟件測試視頻
            • 開(kāi)源軟件測試技術(shù)
            • 軟件測試論壇
            • 軟件測試沙龍
            • 軟件測試資料下載
            • 軟件測試雜志
            • 軟件測試人才招聘
              暫時(shí)沒(méi)有公告

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

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

            發(fā)布: 2008-5-28 21:54 | 作者: 網(wǎng)絡(luò )轉載 | 來(lái)源: 網(wǎng)絡(luò )轉載 | 查看: 552次 | 進(jìn)入軟件測試論壇討論

            領(lǐng)測軟件測試網(wǎng) 用object spy查看測試對象時(shí),有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展現的是運行時(shí)本地測試對象的屬性或方法。在腳本中可以通過(guò)Object屬性來(lái)訪(fǎng)問(wèn)和獲取Run-time Object的屬性或執行其方法。例如:

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

            下面的腳本則通過(guò)Object屬性執行測試對象的某個(gè)方法:

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



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

            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")

            下面的腳本通過(guò)GetROProperty訪(fǎng)問(wèn)測試對象當前的屬性值:

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

            延伸閱讀

            文章來(lái)源于領(lǐng)測軟件測試網(wǎng) http://kjueaiud.com/

            TAG: object qtp QTP test Test 屬性 Object


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

            軟件測試 | 領(lǐng)測國際ISTQBISTQB官網(wǎng)TMMiTMMi認證國際軟件測試工程師認證領(lǐng)測軟件測試網(wǎng)

            老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月
              <ruby id="h6500"><table id="h6500"></table></ruby>
              1. <ruby id="h6500"><video id="h6500"></video></ruby>
                    1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>