To Test the Contents
Testing Data in HTML Elements
There are five types of data tests that you can use on HTML elements. Not all
tests are available for each type of element. For example, you might want to
perform a Contents data test on an HTMLDocument. The Contents data test
captures all of the visible text on the page, including text in forms fields, such as
list boxes and combo boxes. For information about the types of data tests that are
available for each element, see Supported Data Tests for HTML Testing on page
8. Select the verification method that Robot should use to compare the baseline
data captured while recording with the data captured during playback.
For example, you can use the Find Sub String Case Sensitive verification
method to verify that the text captured during recording exactly matches a
subset of the captured text during playback.
Suppose you want to verify that the text, thank you for shopping with Classics Online,
is returned after a customer submits a purchase order. By selecting the Find Sub
String Case Sensitive verification method, you can ensure that Robot will
always test for the text, thank you for shopping with Classics Online, regardless of the
text that surrounds it.
9. Click OK.
10. When finished, click the Stop Recording button on the GUI Record toolbar.
This section provides some additional examples of creating Object Data verification
points for HTML elements.
To Test the Contents of a Drop-Down List Box
1. Add an Object Data verification point.
2. Select the ListBox with the Object Finder tool.
3. Select a Contents data test.
4. Select the Case Sensitive verification method to test for the entire contents of
the list box. Select the Find Sub String Case Sensitive verification method to
test for a subset of the list box items.