background image
<< Test dialog box | To Test for Text within a Table >>
<< Test dialog box | To Test for Text within a Table >>
To Test the Contents
Testing Data in HTML Elements
13-7
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
13-11.
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.
For more information about verification methods and the Object Data
Verification Point dialog box, see Working with the Data in Data Grids on page
4-19.
9. Click OK.
10. When finished, click the Stop Recording button on the GUI Record toolbar.
Additional Examples
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.