public class HTMLDocumentFunctions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CAPTUREBODYSOURCETOFILE_KEYWORD
"CaptureBodySourceToFile"
|
static java.lang.String |
CAPTUREBODYTEXTTOFILE_KEYWORD
"CaptureBodyTextToFile"
|
static java.lang.String |
CLICKLINK_KEYWORD
"ClickLink"
|
static java.lang.String |
CLICKLINKBEGINNING_KEYWORD
"ClickLinkBeginning"
|
static java.lang.String |
CLICKLINKCONTAINING_KEYWORD
"ClickLinkContaining"
|
static java.lang.String |
CLICKLINKMATCHING_KEYWORD
"ClickLinkMatching"
|
static java.lang.String |
VERIFYBODYSOURCE_KEYWORD
"VerifyBodySource"
|
static java.lang.String |
VERIFYBODYTEXT_KEYWORD
"VerifyBodyText"
|
Modifier and Type | Method and Description |
---|---|
static ComponentFunction |
captureBodySourceToFile(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Captures the HTML source of the BODY tag into a file.
|
static ComponentFunction |
captureBodySourceToFile(java.lang.String winname,
java.lang.String compname,
java.lang.String filename,
java.lang.String fileEncoding)
Captures the HTML source of the BODY tag into a file.
|
static ComponentFunction |
captureBodyTextToFile(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Captures the visible document text into a file.
|
static ComponentFunction |
captureBodyTextToFile(java.lang.String winname,
java.lang.String compname,
java.lang.String filename,
java.lang.String fileEncoding)
Captures the visible document text into a file.
|
static ComponentFunction |
clickLink(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Performs an HTMLLink Click based on a complete match of text found on
Links within this HTMLDOCUMENT object.
|
static ComponentFunction |
clickLink(java.lang.String winname,
java.lang.String compname,
java.lang.String compareTextValue,
java.lang.String matchIndex,
java.lang.String caseSensitive)
Performs an HTMLLink Click based on a complete match of text found on
Links within this HTMLDOCUMENT object.
|
static ComponentFunction |
clickLinkBeginning(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Performs an HTMLLink Click based on a partial match of text found on
Links within this HTMLDOCUMENT object.
|
static ComponentFunction |
clickLinkBeginning(java.lang.String winname,
java.lang.String compname,
java.lang.String beginningTextValue,
java.lang.String matchIndex,
java.lang.String caseSensitive)
Performs an HTMLLink Click based on a partial match of text found on
Links within this HTMLDOCUMENT object.
|
static ComponentFunction |
clickLinkContaining(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Performs an HTMLLink Click based on a partial match of text found on
Links within this HTMLDOCUMENT object.
|
static ComponentFunction |
clickLinkContaining(java.lang.String winname,
java.lang.String compname,
java.lang.String compareTextValue,
java.lang.String matchIndex,
java.lang.String caseSensitive)
Performs an HTMLLink Click based on a partial match of text found on
Links within this HTMLDOCUMENT object.
|
static ComponentFunction |
clickLinkMatching(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
DEPARECATED.
|
static ComponentFunction |
clickLinkMatching(java.lang.String winname,
java.lang.String compname,
java.lang.String compareTextValue,
java.lang.String matchIndex,
java.lang.String caseSensitive)
DEPARECATED.
|
static HTMLDocumentFunctions |
getInstance()
public Singleton to access class static methods via instance
|
static ComponentFunction |
verifyBodySource(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Compares the HTML source of the BODY tag with that of a benchmark file.
|
static ComponentFunction |
verifyBodySource(java.lang.String winname,
java.lang.String compname,
java.lang.String benchmark,
java.lang.String fileEncoding)
Compares the HTML source of the BODY tag with that of a benchmark file.
|
static ComponentFunction |
verifyBodyText(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Compares the visible doc text with that of a benchmark file.
|
static ComponentFunction |
verifyBodyText(java.lang.String winname,
java.lang.String compname,
java.lang.String benchmark,
java.lang.String fileEncoding)
Compares the visible doc text with that of a benchmark file.
|
public static final java.lang.String CAPTUREBODYSOURCETOFILE_KEYWORD
public static final java.lang.String CAPTUREBODYTEXTTOFILE_KEYWORD
public static final java.lang.String CLICKLINK_KEYWORD
public static final java.lang.String CLICKLINKBEGINNING_KEYWORD
public static final java.lang.String CLICKLINKCONTAINING_KEYWORD
public static final java.lang.String CLICKLINKMATCHING_KEYWORD
public static final java.lang.String VERIFYBODYSOURCE_KEYWORD
public static final java.lang.String VERIFYBODYTEXT_KEYWORD
public static HTMLDocumentFunctions getInstance()
public static ComponentFunction captureBodySourceToFile(java.lang.String winname, java.lang.String compname, java.lang.String filename, java.lang.String fileEncoding)
Captures the HTML source of the BODY tag into a file. Captures the HTML source of the BODY tag into a file. This includes the BODY tag itself, everything inside it, and the closing /Body tag as well. RobotJ (RJ) Specific Notes: 1) If your HTML document or browser does not support the 'outerHTML' property then you may have to resort to providing internet connection info in the properties file mentioned in #2. 2) If you use proxy to connect to internet, proxy.server and proxy.server.port in the file org.safs.rational.proxyParameter.properties must be set to ensure the execution of this command.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.filename
- Optional:NO
Name of the output file to create in the active "Test" directory.fileEncoding
- Optional:YES DefaultVal:
Specify a character encoding to be used when saving data to a file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.public static ComponentFunction captureBodySourceToFile(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Captures the HTML source of the BODY tag into a file. Captures the HTML source of the BODY tag into a file. This includes the BODY tag itself, everything inside it, and the closing /Body tag as well. RobotJ (RJ) Specific Notes: 1) If your HTML document or browser does not support the 'outerHTML' property then you may have to resort to providing internet connection info in the properties file mentioned in #2. 2) If you use proxy to connect to internet, proxy.server and proxy.server.port in the file org.safs.rational.proxyParameter.properties must be set to ensure the execution of this command.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.parameters
- Optional:NO
An array containing the following parameters:
public static ComponentFunction captureBodyTextToFile(java.lang.String winname, java.lang.String compname, java.lang.String filename, java.lang.String fileEncoding)
Captures the visible document text into a file. Captures the visible document text into a file. That is, generally, the text you see with no HTML tags. /Body tag as well.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.filename
- Optional:NO
Name of the output file to create in the active "Test" directory.fileEncoding
- Optional:YES DefaultVal:
Specify a character encoding to be used when saving data to a file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.public static ComponentFunction captureBodyTextToFile(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Captures the visible document text into a file. Captures the visible document text into a file. That is, generally, the text you see with no HTML tags. /Body tag as well.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.parameters
- Optional:NO
An array containing the following parameters:
public static ComponentFunction clickLink(java.lang.String winname, java.lang.String compname, java.lang.String compareTextValue, java.lang.String matchIndex, java.lang.String caseSensitive)
Performs an HTMLLink Click based on a complete match of text found on Links within this HTMLDOCUMENT object. Performs an HTMLLink Click based on a complete match of text found on Links within this HTMLDOCUMENT object. Optionally, the user can also specify a match index to indicate that the desired Link is the "nth" Link that matches the text criteria. The text comparison for the Link is NOT case-sensitive by default. Leading and trailing whitespace will be removed from the links as they are compared unless the link in the HTML itself is quoted. In addition, any Line Feeds and Carriage Returns will be removed. For the link, we use the outerText property to locate the text.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.compareTextValue
- Optional:NO
The text to compare with each Link.matchIndex
- Optional:YES
Optional match index indicating the desired link is not the first
link that matches, but the "nth" link that matches.caseSensitive
- Optional:YES
"Case-Sensitive", "CaseSensitive", or "True" will make search case-sensitive.public static ComponentFunction clickLink(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Performs an HTMLLink Click based on a complete match of text found on Links within this HTMLDOCUMENT object. Performs an HTMLLink Click based on a complete match of text found on Links within this HTMLDOCUMENT object. Optionally, the user can also specify a match index to indicate that the desired Link is the "nth" Link that matches the text criteria. The text comparison for the Link is NOT case-sensitive by default. Leading and trailing whitespace will be removed from the links as they are compared unless the link in the HTML itself is quoted. In addition, any Line Feeds and Carriage Returns will be removed. For the link, we use the outerText property to locate the text.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.parameters
- Optional:NO
An array containing the following parameters:
public static ComponentFunction clickLinkBeginning(java.lang.String winname, java.lang.String compname, java.lang.String beginningTextValue, java.lang.String matchIndex, java.lang.String caseSensitive)
Performs an HTMLLink Click based on a partial match of text found on Links within this HTMLDOCUMENT object. Performs an HTMLLink Click based on a partial match of text found on Links within this HTMLDOCUMENT object. The text of the Link is expected to BEGIN with the text provided by the user. Optionally, the user can also specify a match index to indicate that the desired Link is the "nth" Link that matches the text criteria. The text comparison for the Link is NOT case-sensitive by default. The user can specify a case-senstive comparison via CaseSensitive Field #7. Leading and trailing whitespace will be removed from the links as they are compared unless the link in the HTML itself is quoted. In addition, any Line Feeds and Carriage Returns will be removed. For the link, we use the outerText property to locate the text.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.beginningTextValue
- Optional:NO
The text (NOT case-sensitive) to compare with the beginning of each Link.matchIndex
- Optional:YES
Optional match index indicating the desired link is not the first
link that matches, but the "nth" link that matches.caseSensitive
- Optional:YES
"Case-Sensitive", "CaseSensitive", or "True" will make search case-sensitive.public static ComponentFunction clickLinkBeginning(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Performs an HTMLLink Click based on a partial match of text found on Links within this HTMLDOCUMENT object. Performs an HTMLLink Click based on a partial match of text found on Links within this HTMLDOCUMENT object. The text of the Link is expected to BEGIN with the text provided by the user. Optionally, the user can also specify a match index to indicate that the desired Link is the "nth" Link that matches the text criteria. The text comparison for the Link is NOT case-sensitive by default. The user can specify a case-senstive comparison via CaseSensitive Field #7. Leading and trailing whitespace will be removed from the links as they are compared unless the link in the HTML itself is quoted. In addition, any Line Feeds and Carriage Returns will be removed. For the link, we use the outerText property to locate the text.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.parameters
- Optional:NO
An array containing the following parameters:
public static ComponentFunction clickLinkContaining(java.lang.String winname, java.lang.String compname, java.lang.String compareTextValue, java.lang.String matchIndex, java.lang.String caseSensitive)
Performs an HTMLLink Click based on a partial match of text found on Links within this HTMLDOCUMENT object. Performs an HTMLLink Click based on a partial match of text found on Links within this HTMLDOCUMENT object. The text of the Link is expected to CONTAIN the text provided by the user at any position in the Link text--not strictly the beginning as in ClickLinkBeginning. Optionally, the user can also specify a match index to indicate that the desired Link is the "nth" Link that matches the text criteria. The text comparison for the Link is NOT case-sensitive by default. Leading and trailing whitespace will be removed from the links as they are compared unless the link in the HTML itself is quoted. In addition, any Line Feeds and Carriage Returns will be removed. For the link, we use the outerText property to locate the text.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.compareTextValue
- Optional:NO
The text to compare with each Link.matchIndex
- Optional:YES
Optional match index indicating the desired link is not the first
link that matches, but the "nth" link that matches.caseSensitive
- Optional:YES
"Case-Sensitive", "CaseSensitive", or "True" will make search case-sensitive.public static ComponentFunction clickLinkContaining(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Performs an HTMLLink Click based on a partial match of text found on Links within this HTMLDOCUMENT object. Performs an HTMLLink Click based on a partial match of text found on Links within this HTMLDOCUMENT object. The text of the Link is expected to CONTAIN the text provided by the user at any position in the Link text--not strictly the beginning as in ClickLinkBeginning. Optionally, the user can also specify a match index to indicate that the desired Link is the "nth" Link that matches the text criteria. The text comparison for the Link is NOT case-sensitive by default. Leading and trailing whitespace will be removed from the links as they are compared unless the link in the HTML itself is quoted. In addition, any Line Feeds and Carriage Returns will be removed. For the link, we use the outerText property to locate the text.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.parameters
- Optional:NO
An array containing the following parameters:
public static ComponentFunction clickLinkMatching(java.lang.String winname, java.lang.String compname, java.lang.String compareTextValue, java.lang.String matchIndex, java.lang.String caseSensitive)
DEPARECATED. This command is identical to ClickLink. DEPARECATED. This command is identical to ClickLink.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.compareTextValue
- Optional:NO
The text to compare with each Link.matchIndex
- Optional:YES
Optional match index indicating the desired link is not the first
link that matches, but the "nth" link that matches.caseSensitive
- Optional:YES
"Case-Sensitive", "CaseSensitive", or "True" will make search case-sensitive.public static ComponentFunction clickLinkMatching(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
DEPARECATED. This command is identical to ClickLink. DEPARECATED. This command is identical to ClickLink.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.parameters
- Optional:NO
An array containing the following parameters:
public static ComponentFunction verifyBodySource(java.lang.String winname, java.lang.String compname, java.lang.String benchmark, java.lang.String fileEncoding)
Compares the HTML source of the BODY tag with that of a benchmark file. This includes the BODY tag itself, everything inside it, and the closing /Body tag as well. RRAFS: The routine will automatically create a temporary ObjectData VP with a dummy baseline, capture the actual file, transfer it to active "Test" directory, and compare it with the benchmark. The routine will then delete all significant remnants of the temporary ObjectData VP. RRAFS: This routine requires that the following two files exist in the DDE_RUNTIME directory: HTMLDocumentHTML.grd HTMLDocumentHTML.vpm The command may produce a WARNING if a diff tool for which we have no means to verify the results is configured for use. Consequently, if these warnings are expected, the user can use the "TW" test record type to avoid issuing these warnings. RobotJ (RJ) Specific Notes: 1) If you use proxy to connect to internet, proxy.server and proxy.server.port in the file org.safs.rational.proxyParameter.properties must be set to ensure the execution of this command.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.benchmark
- Optional:NO
Name of the benchmark file in the active "Bench" directory to
use for the actual test file comparison.fileEncoding
- Optional:YES DefaultVal:
Specify a character encoding to be used when opening a bench file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.public static ComponentFunction verifyBodySource(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Compares the HTML source of the BODY tag with that of a benchmark file. This includes the BODY tag itself, everything inside it, and the closing /Body tag as well. RRAFS: The routine will automatically create a temporary ObjectData VP with a dummy baseline, capture the actual file, transfer it to active "Test" directory, and compare it with the benchmark. The routine will then delete all significant remnants of the temporary ObjectData VP. RRAFS: This routine requires that the following two files exist in the DDE_RUNTIME directory: HTMLDocumentHTML.grd HTMLDocumentHTML.vpm The command may produce a WARNING if a diff tool for which we have no means to verify the results is configured for use. Consequently, if these warnings are expected, the user can use the "TW" test record type to avoid issuing these warnings. RobotJ (RJ) Specific Notes: 1) If you use proxy to connect to internet, proxy.server and proxy.server.port in the file org.safs.rational.proxyParameter.properties must be set to ensure the execution of this command.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.parameters
- Optional:NO
An array containing the following parameters:
public static ComponentFunction verifyBodyText(java.lang.String winname, java.lang.String compname, java.lang.String benchmark, java.lang.String fileEncoding)
Compares the visible doc text with that of a benchmark file. The routine will automatically create a temporary ObjectData VP with a dummy baseline, capture the actual file, transfer it to active "Test" directory, and compare it with the benchmark. The routine will then delete all significant remnants of the temporary ObjectData VP. This routine requires that the following two files exist in the DDE_RUNTIME directory: HTMLDocumentText.grd HTMLDocumentText.vpm The command may produce a WARNING if a diff tool for which we have no means to verify the results is configured for use. Consequently, if these warnings are expected, the user can use the "TW" test record type to avoid issuing these warnings.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.benchmark
- Optional:NO
Name of the benchmark file in the active "Bench" directory to
use for the actual test file comparison.fileEncoding
- Optional:YES DefaultVal:
Specify a character encoding to be used when opening a bench file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.public static ComponentFunction verifyBodyText(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Compares the visible doc text with that of a benchmark file. The routine will automatically create a temporary ObjectData VP with a dummy baseline, capture the actual file, transfer it to active "Test" directory, and compare it with the benchmark. The routine will then delete all significant remnants of the temporary ObjectData VP. This routine requires that the following two files exist in the DDE_RUNTIME directory: HTMLDocumentText.grd HTMLDocumentText.vpm The command may produce a WARNING if a diff tool for which we have no means to verify the results is configured for use. Consequently, if these warnings are expected, the user can use the "TW" test record type to avoid issuing these warnings.Supporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.parameters
- Optional:NO
An array containing the following parameters:
Copyright © SAS Institute. All Rights Reserved.