Automation
Using Descriptive Programming (Hand Coding):
Descriptive Programming is the smartest way for Automation in Coded UI Test.
Descriptive Programming in Coded UI
Test is much different from simple Record and Play method.
Following are some important points
regarding Descriptive Programming in Coded UI Test.
- It doesn’t require recording the page and so no need worry about object repository.
- Providing Objects information directly into the test script, instead of storing objects information in Object repository.
- Useful in dynamic object automation.
·
Descriptive Programming based test
scripts are faster in execution than Object Repository (UI Map) based Test Scripts.
·
Scripts are Portable (we can run
these scripts from any machine easily).
- You can optimize your code.
- Maintenance is easy (less amount of resources).
- Before starting Descriptive Programming you need to know about object properties and their values, using object spy you can see each object’s properties.
Coded UI Test Descriptive Programming in a very Simple and Practical way:
·
Coded UI Test Builder can be used as
Spy.
·
By using Coded UI Test Builder we can easily Spy the object properties
Sample Code for
Descriptive Programing (Hand Coding) Concept: