- Test Script Synchronization
- Placing a Generic Delay in Your Script
- Waiting for Test Objects to Come into Existence
- Timing How Long Something Takes to Execute in a Script
- Working with Test Objects
- Working with the Clipboard Object
- Viewing an Objects Properties
- Retrieving All Properties of a Test Object
- Retrieving the Value of a Single Property
- Programmatically Retrieving Data from an Object in My Application
- Determining a Test Objects Valid Test Data Type Arguments to getTestData()
- Using getTestData to Extract Data from a Text Field
- Using getTestData to Extract Data from a List
- Using getTestData() to Read Data in a Table
- Using getTestData() to Extract Data from a Tree
- Obtaining Data from a Test Object That the Rational Functional Tester Verification Point Wizard Does Not Capture
- Creating a Custom Verification Point
- Changing the Value of a Test Objects Property
- Evolving Custom Scripting into Reusable Methods
Working with Test Objects
Chapter 1 discussed the use of test object maps at a high level. It also provided an overview on test objects including adding, modifying, and deleting them. Rational Functional Tester records and uses these objects to interact with an application’s user interface. You begin to unleash the power of Rational Functional Tester when you choose to manipulate these objects.
Test objects offer more than what you see when you are done recording. Typically, a recorded script shows you actions against test objects. You see things such as clicks, double-clicks, text-entry commands, and so on. When you dig deeper into these, you find that you can access interesting information. You can programmatically access properties that describe the object and the data that it contains. You also have access to an object’s methods that can be invoked from your script. Chapter 10, “Advanced Scripting with Rational Functional Tester TestObjects,” covers this topic. For the purposes of this chapter, you examine the basics of accessing test object properties and data using the scripting language.
After you have the basics of programmatically accessing test object data, you get a look at how you can start encapsulating your custom scripting to develop your own methods and functions. This is a great means for other members of your team to take advantage of the work you did, avoiding any redundant custom scripting.