未来已来

老婆测试工具培训记 - QTP Scripting - 实践9

上一篇 / 下一篇  2008-08-01 13:36:11 / 个人分类:自动化测试

Write a program toDynamically adding to WebList?

思路:html dom 技术

脚本代码:

    Dim objDoc
    Dim objElement
    Dim newNode

    Set ōbjDoc = Browser("Browser").Page("Page").Object
    Set ōbjElement = objDoc.GetElementByID("WebList")

   

    Set newNode = objDoc.createElement("option")
    newNode.Text = "Test——pcl"
    objElement.add newNode

    Set newNode = Nothing
    Set ōbjElement = Nothing
    Set ōbjDoc = Nothing


TAG: 自动化测试

 

评分:0

我来说两句

Open Toolbar