public class HTMLImageFunctions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLICK_KEYWORD
"Click"
|
static java.lang.String |
CLICKAREA_KEYWORD
"ClickArea"
|
static java.lang.String |
COMPARESTOREDDATA_KEYWORD
"CompareStoredData"
|
static java.lang.String |
COMPARESTOREDPROPERTIES_KEYWORD
"CompareStoredProperties"
|
static java.lang.String |
SAVEHTMLIMAGE_KEYWORD
"SaveHTMLImage"
|
static java.lang.String |
VERIFYHTMLIMAGE_KEYWORD
"VerifyHTMLImage"
|
Modifier and Type | Method and Description |
---|---|
static ComponentFunction |
click(java.lang.String winname,
java.lang.String compname,
java.lang.String appMapSubkey)
Command deprecated in favor of ClickArea.
|
static ComponentFunction |
clickArea(java.lang.String winname,
java.lang.String compname,
java.lang.String appMapSubkey)
Attempts to perform a Click on a mapped region of an Image (on a webpage).
|
static ComponentFunction |
compareStoredData(java.lang.String winname,
java.lang.String compname,
java.lang.String vPAsset)
Performs a HTMLImageVP CompareData on an HTMLImage object.
|
static ComponentFunction |
compareStoredProperties(java.lang.String winname,
java.lang.String compname,
java.lang.String vPAsset)
Performs a HTMLImageVP CompareProperties on an HTMLImage object.
|
static HTMLImageFunctions |
getInstance()
public Singleton to access class static methods via instance
|
static ComponentFunction |
saveHTMLImage(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Attempts to Save an HTMLImage on a webpage.
|
static ComponentFunction |
saveHTMLImage(java.lang.String winname,
java.lang.String compname,
java.lang.String fileName,
java.lang.String coords)
Attempts to Save an HTMLImage on a webpage.
|
static ComponentFunction |
verifyHTMLImage(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Attempts to verify an HTMLImage on a webpage to a benchmark file.
|
static ComponentFunction |
verifyHTMLImage(java.lang.String winname,
java.lang.String compname,
java.lang.String benchmarkFile,
java.lang.String coords)
Attempts to verify an HTMLImage on a webpage to a benchmark file.
|
public static final java.lang.String CLICK_KEYWORD
public static final java.lang.String CLICKAREA_KEYWORD
public static final java.lang.String COMPARESTOREDDATA_KEYWORD
public static final java.lang.String COMPARESTOREDPROPERTIES_KEYWORD
public static final java.lang.String SAVEHTMLIMAGE_KEYWORD
public static final java.lang.String VERIFYHTMLIMAGE_KEYWORD
public static HTMLImageFunctions getInstance()
public static ComponentFunction click(java.lang.String winname, java.lang.String compname, java.lang.String appMapSubkey)
Command deprecated in favor of ClickArea. Attempts to perform a standard Click on an HTMLImage on a webpage. This functionality is already provided by GenericObject CLICK. We can optionally click on a particular area of a client-side or server-side image rather than a generic click (Coords=1,1). This part of the functionality should be implemented in ClickArea instead. The image area lookup is done with the component name AND an additional app map reference provided in Field #5. Typical Data Table records: (1) t BrowserWin AnImage Click (2) t BrowserWin AnImage Click AMappedRegion #1 above should merely click in the top-left corner of the image. #2 above will contain a AnImage entry in the MainWindow section with normal recognition information for it. AnImage will also have it's own section in the Application Map in which there will be entries defining specific indexed or named regions for the image. Examples: [BrowserWin] BrowserWin=WindowTag=WEBBrowser AnImage=Type=HTMLFrame;HTMLID=top;Type=HTMLImage;Index=1 ... [AnImage] AMappdedRegion=Coords=10,10 ANamedRegion=AreaName=TechSupport AnIndexedRegion=AreaIndex=2 AnotherRegion=AreaID=ContactSupporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.appMapSubkey
- Optional:YES
Name of the AppMap subkey to lookup and use for the click.public static ComponentFunction clickArea(java.lang.String winname, java.lang.String compname, java.lang.String appMapSubkey)
Attempts to perform a Click on a mapped region of an Image (on a webpage). RobotJ: The initial implementation actually does this in reverse. It expects that the specified object resolves to the HTML.AREA object defined in the HTML.MAP instead of simply specifying the Image and then an area. The RobotJ implementation then attempts to locate the Doc and Image that use the defined area and click on it. No Field #5 parameter is used or needed in this implementation. Future implementations should also\instead support the HTML.IMAGE object as the target and the area to click as a Field #5 parameter. The parameter would optionally define an App Map reference or could be used as a literal value. App Map references might appear as below: Examples: [BrowserWin] AnImage=Type=HTMLFrame;HTMLID=top;Type=HTMLImage;Index=1 ... [AnImage] ANamedRegion=AreaName=TechSupport AnIndexedRegion=AreaIndex=2 AnotherRegion=AreaID=ContactSupporting Engines:
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.appMapSubkey
- Optional:YES
(FUTURE) Name of the AppMap subkey to lookup and use for the image area click.public static ComponentFunction compareStoredData(java.lang.String winname, java.lang.String compname, java.lang.String vPAsset)
Performs a HTMLImageVP CompareData on an HTMLImage object. Performs a HTMLImageVP CompareData on an HTMLImage object. THE BENCHMARK VP MUST ALREADY EXIST AND BE AN ASSET OF THE CURRENTLY RUNNING SCRIPT. Modified VP parameter information can be added to the standard VP=VPName by including the VPName reference in the application map in a section defined for the HTMLImage. If this is done, the value retrieved from the application map will be appended to VP=VPName. The required semicolon for this append will be provided by this routine. Example 1: Perform a standard HTMLImage CompareData. To perform a basic CompareData the name "StoredVP" will not exist in the app map: The Step File call: BrowserWindow AnHTMLImage CompareStoredData StoredVP This will produce a CompareData VP with "VP=StoredVP;Wait=2,10". The StoredVP baseline MUST already exist as an asset of the currently running script. Example 2: Perform a HTMLImage CompareData providing addition parameter information (such as ExpectedResult=FAIL). To do this the HTMLImage object must have its own section in the app map and an item with the same name as the StoredVP. The value of that item will be appended to the standard VP argument with a semicolon. Part of App Map: [BrowserWindow] BrowserWindow=WindowTag=WEBBrowser AnHTMLImage=Supporting Engines:;\;Type=HTMLImage;Index=1 ... [AnHTMLImage] StoredVP=ExpectedResult=FAIL;Wait=3,30 The Step File call: BrowserWindow AnHTMLImage CompareStoredData StoredVP This will produce a CompareData VP with all the parameters appended like this: "VP=StoredVP;ExpectedResult=FAIL;Wait=3,30". NOTE:When stored parameters are found in the app map then the default Wait= parameter used in the standard compare is no longer provided. If you still need a Wait= parameter, then it must be included in the stored parameters. The StoredVP baseline MUST already exist as an asset of the currently running script.
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.vPAsset
- Optional:NO
Name of the pre-existing VP asset stored in the currently running script.public static ComponentFunction compareStoredProperties(java.lang.String winname, java.lang.String compname, java.lang.String vPAsset)
Performs a HTMLImageVP CompareProperties on an HTMLImage object. Performs a HTMLImageVP CompareProperties on an HTMLImage object. THE BENCHMARK VP MUST ALREADY EXIST AND BE AN ASSET OF THE CURRENTLY RUNNING SCRIPT. Modified VP parameter information can be added to the standard VP=VPName by including the VPName reference in the application map in a section defined for the HTMLImage. If this is done, the value retrieved from the application map will be appended to VP=VPName. The required semicolon for this append will be provided by this routine. Example 1: Perform a standard HTMLImage CompareProperties. To perform a basic CompareProperties the name "StoredVP" will not exist in the app map: The Step File call: BrowserWindow AnHTMLImage CompareStoredProperties StoredVP This will produce a CompareProperties VP with "VP=StoredVP;Wait=2,10". The StoredVP baseline MUST already exist as an asset of the currently running script. Example 2: Perform a HTMLImage CompareProperties providing addition parameter information (such as ExpectedResult=FAIL). To do this the HTMLImage object must have its own section in the app map and an item with the same name as the StoredVP. The value of that item will be appended to the standard VP argument with a semicolon. Part of App Map: [BrowserWindow] BrowserWindow=WindowTag=WEBBrowser AnHTMLImage=Supporting Engines:;\;Type=HTMLImage;Index=1 ... [AnHTMLImage] StoredVP=ExpectedResult=FAIL;Wait=3,30 The Step File call: BrowserWindow AnHTMLImage CompareStoredProperties StoredVP This will produce a CompareProperties VP with all the parameters appended like this: "VP=StoredVP;ExpectedResult=FAIL;Wait=3,30". NOTE:When stored parameters are found in the app map then the default Wait= parameter used in the standard compare is no longer provided. If you still need a Wait= parameter, then it must be included in the stored parameters. The StoredVP baseline MUST already exist as an asset of the currently running script.
winname
- Optional:NO
The name of the window to act upon.compname
- Optional:NO
The name of the component to act upon.vPAsset
- Optional:NO
Name of the pre-existing VP asset stored in the currently running script.public static ComponentFunction saveHTMLImage(java.lang.String winname, java.lang.String compname, java.lang.String fileName, java.lang.String coords)
Attempts to Save an HTMLImage on a webpage. Attempts to perform a right click - save image/picture as command on the specified image. You can also optionally specify an x,y offset into the image for the right click to occur.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 image file.coords
- Optional:YES DefaultVal:3,3
The explicit coordinates ("x,y"), or an App Map reference to
pre-defined coordinates.public static ComponentFunction saveHTMLImage(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Attempts to Save an HTMLImage on a webpage. Attempts to perform a right click - save image/picture as command on the specified image. You can also optionally specify an x,y offset into the image for the right click to occur.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 verifyHTMLImage(java.lang.String winname, java.lang.String compname, java.lang.String benchmarkFile, java.lang.String coords)
Attempts to verify an HTMLImage on a webpage to a benchmark file. Attempts to perform a right click - save image/picture as command on the specified image and then run a binary file compare of the file to a benchmark file. You can also optionally specify an x,y offset into the image for the right click to occur. 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.benchmarkFile
- Optional:NO
Name of the Benchmark image file.coords
- Optional:YES DefaultVal:3,3
The explicit coordinates ("x,y") or an App Map reference to
pre-defined coordinates.public static ComponentFunction verifyHTMLImage(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Attempts to verify an HTMLImage on a webpage to a benchmark file. Attempts to perform a right click - save image/picture as command on the specified image and then run a binary file compare of the file to a benchmark file. You can also optionally specify an x,y offset into the image for the right click to occur. 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.