Having Eggplant perform an action on text requires text images that match the text displayed by the test system. You can either capture these text images manually or you can have Eggplant generate these images for you during runtime.
If you are going to use Eggplant’s text generation capabilities to generate text images you need to specify the appropriate attributes for the text in question. A complete list of SenseTalk text attributes are as follows:
TextFont: font used for the text
TextSize: size of the text
TextColor: RGB color of the text
TextBackgroundColor: RGB color of the background
TextPlatform: The platform that you want to text to be generated on
Underline: Yes or No
Bold: Yes or No
Italic: Yes or No
Generating an image of the ?Forum Index? on this page could be done as follows:
MoveTo (Text:"Forum Index", TextFont: "Verdana", TextSize:"11", TextColor:(255,112,18))
Note: Any attribute NOTexplicitly stated will automatically assume the value stored in the default text style. The textBackgroundColor for instance, will assume the white background color stored in the default text style.
Text styles pertain to a set of specific text attributes. Menu styles and styles for window titles for instance, are specific text attributes that pertain to those particular interface elements. You can create your own text styles from Eggplant Preferences >> Text. Note: There are a handful of text styles already created for you. The ?Menu? text style for example, could be used to generate text images of menu items. Had you stored the text attributes for the example above into a style called ?redstoneLink? your script would read:
MoveTo(Text:?Forum Index?, TextStyle:?redstoneLink?)
Underlined Hyperlinks: Hyperlink underlines are typically NOT rendered through the font rasterizer but are drawn in as graphics making them very difficult to match with a generated underlined text image. Therefore, it is best if you do NOT use the underline property to generate hyperlink text that is underlined.