QTP Tutorial
QTP Useful Resources
Selected Reading
- QTP - Designing a Framework
- QTP - Frameworks
- QTP - Automation Object Model
- QTP - Descriptive Programming
- QTP - Working with XML
- QTP - Accessing Databases
- QTP - Virtual Objects
- QTP - GUI Objects
- QTP - Test Results
- QTP - Library Files
- QTP - Environment Variables
- QTP - Recovery Scenarios
- QTP - Error Handling
- QTP - Debugging
- QTP - Smart Identification
- QTP - Synchronization
- QTP - Checkpoints
- QTP - DataTables
- QTP - Actions
- QTP - Object Repository
- QTP - Record and Play Back
- QTP - Environment Setup
- QTP - Test Automation
- QTP - Introduction
- QTP - Home
QTP Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
QTP - Descriptive Programming
QTP - Descriptive Programming
只有在物体位于保留地时,方言书方可执行。 物体的描述是用描述性节目制作的。
当测试者希望对目标存放处没有的物体进行操作时
申请中物体在性质上非常活跃时。
当目标保存机构大增时,由于目标保存机构的规模增加,结果表现不佳。
当框架建立时,决定根本不使用保留地。
当测试者想要在不了解物体的独特特性的情况下在运行时间就申请采取行动时。
Syntax
采用描述性方案编制技术进行描述有两种方法。 他们:
Description Objects
Description Strings
Description Objects
标本是依据所用特性及其相应价值开发的。 然后,这些描述被用来打造文字。
Creating a description object Set btncalc = Description.Create() Add descriptions and properties btncalc("type").value = "Button" btncalc("name").value = "calculate" btncalc("html tag").value = "INPUT" Use the same to script it Browser("Math Calc").Page("Num Calculator").WebButton(btncalc).Cpck
Description Strings
对这些物体的描述是以下文所示特性和价值为示例的。
Browser("Math Calc").Page("Num Calculator").WebButton("html tag:=INPUT","type:=Button","name:=calculate").Cpck
Child Objects
QTP提供了“儿童目标”方法,使我们能够建立一套物品。 母体物体在“儿童目标”之前。
Dim oDesc Set oDesc = Description.Create oDesc("micclass").value = "Link" Find all the Links Set obj = Browser("Math Calc").Page("Math Calc").ChildObjects(oDesc) Dim i obj.Count value has the number of pnks in the page For i = 0 to obj.Count - 1 get the name of all the pnks in the page x = obj(i).GetROProperty("innerhtml") print x Next
Ordinal Identifiers
描述性方案用于根据矿石识别特征撰写描述,使QTP能够在两个或两个以上物体具有相同特性时对这些物体采取行动。
Using Location Dim Obj Set Obj = Browser("title:=.*google.*").Page("micclass:=Page") Obj.WebEdit("name:=Test","location:=0").Set "ABC" Obj.WebEdit("name:=Test","location:=1").Set "123" Index Obj.WebEdit("name:=Test","index:=0").Set "1123" Obj.WebEdit("name:=Test","index:=1").Set "2222" Creation Time Browser("creationtime:=0").Sync Browser("creationtime:=1").Sync Browser("creationtime:=2").SyncAdvertisements