0
我是QTP
的新手,並試圖解決此錯誤。我使用了描述性編程的動態方法。當運行下面的代碼我得到這個錯誤:如何擺脫QTP中的這個錯誤?
"The "[ WebButton ]" object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object."
我的腳本是:
Set oDesc=Description.Create()
oDesc("title").value="Google"
Set oDesc1=Description.Create()
oDesc1("name").value="q"
Set oDesc2=Description.Create()
oDesc2("html tag").value="INPUT"
oDesc2("height").value="30"
oDesc2("index:").value="0"
Browser(oDesc).page(oDesc).WebEdit(oDesc1).Set 10
Browser(oDesc).page(oDesc).WebButton(oDesc2).Click
我曾用「指數」的屬性,以便QTP
唯一地標識對象。請幫忙。
可以嘗試刪除冒號「:」索引屬性後, 使其oDesc2(「指數」)值=「0」並檢查 – user5612655