GetTextContent
Syntax
string getTextContent (string drawfunction, string text, int index)
Description
Retrieve content of the text fragment residing in a given control.
Parameters
drawfunction
TestArchitect detects the text fragment drawn by its drawing functions.
Allowable values:
DrawTextA: Retrieve texts drawn by the DrawTextA function (ANSI name).
DrawTextW: Retrieve texts drawn by the DrawTextW function (Unicode name).
TextOutA: Retrieve texts drawn by the TextOutA function (ANSI name).
TextOutW: Retrieve texts drawn by the TextOutA function (Unicode name).
ExtTextOutA: Retrieve texts drawn by the ExtTextOutA function (ANSI name).
ExtTextOutW: Retrieve texts drawn by the ExtTextOutW function (Unicode name).
注意:If the argument’s value is omitted, by default, TestArchitect retrieve texts drawn by all drawing functions above.
To use multiple values at a time, use semi-colon ( ; ) as delimiters between values.
text
String representing the bitmap text fragment to be searched for.
index
Specifies a minimum number of instances of the search text that must be discovered within the active area for the target bitmap text fragment to be considered as found (default = 1).
Return Value
A string value indicating content of the text.
Notes
- This method always employs the Graphics Device Interface (GDI) technique to recognize text produced by an AUT.