GetTextWithText
Description:
Get an Element of Text of the current Document that contains the specified Text.
Format:
GetTextWithText (integer Session ID (optional), string Text, integer Occurrence (optional))
|
Parameters: |
Integer |
Session ID (optional) |
Browser Occurrence Number.
First Browser occurrence is 1
Default value is 1 |
|
String |
Text |
Text within the Element.
Wildcards ('*') are not needed |
|
Integer |
Occurrence (optional) |
Text Occurrence Number.
First Text occurrence is 1
Default value is 1 |
|
Return Value: |
String |
Line |
Line of Text of the current Document. |
Usage:
Use this function to get the smallest Element of Text (HTML is removed) containing the specified Text of the current Document in the specified Browser (such as a Column Header in table). The Element of Text is what the Browser determines the text is and may not be formatted exactly as expected. Wildcards are not needed for the match Text because by definition this is a partial match search. Use the optional Text Occurrence Number when more than one Element on the Document matches the Text string. Matches are not Case Sensitive.
Example 1:
Get an Element of Text of the current Document in the default Browser occurrence that contains the word 'City'.
string strElement
strElement = GetTextWithText ('City')
Example 2:
Get the second Element of Text that displays the word 'Product'.
string strElement
strElement = GetTextWithText ('Product', 2)
Example 3:
Get the second Element of Text that displays the word 'Product' on the third occurrence of the Browser.
string strElement
strElement = GetTextWithText (3, 'Product', 2)