public class AIComponent extends AISearchBase
Criteria
.SeleniumPlus.Assert, SeleniumPlus.CheckBox, SeleniumPlus.ComboBox, SeleniumPlus.Component, SeleniumPlus.Counters, SeleniumPlus.EditBox, SeleniumPlus.Files, SeleniumPlus.ListView, SeleniumPlus.Logging, SeleniumPlus.Menu, SeleniumPlus.Misc, SeleniumPlus.Rest, SeleniumPlus.ScrollBar, SeleniumPlus.Strings, SeleniumPlus.TabControl, SeleniumPlus.Tree, SeleniumPlus.WDTimeOut, SeleniumPlus.Window
SAFSPlus.DriverCommand
Modifier and Type | Field and Description |
---|---|
protected Component |
libComponent
The library component
|
static int |
MAX_TRY_DEFAULT |
protected int |
maxRetry
The maximum time to retry 'enter the text' into Component box if the verification fails.
|
static java.lang.String |
TYPE
"Component"
|
_abort_on_assert_failure, _abort_on_find_failure, _case_does_not_matter, _log_details, _substring_matches_allowed, _using_cached_component, cachedLibComponents, DEFAULT_SEPLUS_AI_DEFINITIONS, frames, frameTree, GLUE_OPT, searchContext
PRODUCT_DESCRIPTION, PRODUCT_NAME, PRODUCT_VERSION, Runner, TEMP_SELENIUM_PLUS_RS_VAR
_autorun, _autorunClassProvided, _injectDataAwareness, _isInjected, _isSPC, _junit, allowExit, ARG_AUTORUN, ARG_AUTORUN_CLASS, ARG_JUNIT, ARG_SAFSVAR, DefaultRunner, exitCode, normalizeTextForInput, prevResults, RELATIVE_TO_PARENT, RELATIVE_TO_SCREEN, springApplicationContext
Constructor and Description |
---|
AIComponent() |
Modifier and Type | Method and Description |
---|---|
protected java.awt.Point |
checkForCoord(java.lang.String coordinate) |
protected boolean |
clearHighlight()
Clear the highlight after the execution if user has turned on the highlight ability.
|
protected boolean |
doSetText(java.lang.String libName,
java.lang.String text,
boolean isCharacter,
boolean needVerify) |
protected Criteria |
generateCriteria(java.lang.String recognitionString) |
protected Criteria |
generateCriteria(java.lang.String recognitionString,
java.lang.String customerType) |
protected java.awt.Rectangle |
getComponentRectangle() |
protected java.lang.String |
getType() |
protected boolean |
highlight()
Highlight the WebElement if user has turned on the highlight ability.
|
protected boolean |
ignoreCache(java.lang.String action) |
protected void |
initComponent(org.openqa.selenium.WebElement we) |
protected void |
localProcess(java.lang.String action,
java.util.List<java.lang.String> parameters)
Handle the specific keywords against a specific component.
|
protected void |
process(java.lang.String action,
Criteria criteria,
int nthMatched,
java.util.List<java.lang.String> parameters)
Handle the SAFS Keywords against the a component matching the provided textlabel.
|
protected void |
process(java.lang.String action,
java.lang.String criteria,
int nthMatched,
java.util.List<java.lang.String> parameters)
Handle the SAFS Keywords against the a component matching the provided textlabel.
|
protected void |
process(java.lang.String action,
java.lang.String criteria,
int nthMatched,
java.util.List<java.lang.String> parameters,
java.lang.String customerType)
Handle the SAFS Keywords against the a component matching the provided textlabel.
|
protected void |
setText(java.lang.String libName,
boolean isCharacter,
java.lang.String text)
Clear the content of Component box first, and then enter the text into it.
|
addNonRepeatedElements, convertElementArrayToList, deduceBenchFile, deduceDiffFile, deduceProjectFile, deduceTestFile, findElementInParent, findElements, findElementsInParent, findSelectableItemFromText, getCachedLibComponent, getFirstIFrame, getXpathType, initializeFrames, logElementIdInfo, logElementProperties, logListElementsInfo, logMapKeyValues, main, matched, resetFrames, runCukesTest, runCukesTest, runCukesTest, runTest, saveCachedLibComponent
AbortTest, AltLeftDrag, Click, ClickUnverified, CtrlAltLeftDrag, CtrlClick, CtrlLeftDrag, CtrlRightClick, CtrlShiftLeftDrag, deduceFilterAreas, DoubleClick, executeAsyncScript, ExecuteScript, executeScript, GetGUIImage, GetGUIImage, getObject, getObject, GetVariableValue, Highlight, HoverScreenLocation, LeftDrag, Pause, PrintTestCaseSummary, PrintTestSuiteSummary, RightClick, RightDrag, SetVariableValue, ShiftClick, ShiftLeftDrag, StartTestCase, StartTestSuite, StartWebBrowser, StopTestCase, StopWebBrowser, SwitchWebBrowser, TypeChars, TypeEncryption, TypeKeys, VerifyBinaryFileToFile, VerifyFileToFile, VerifyGUIImageToFile, VerifyTextFileToFile, VerifyValueContains, VerifyValueContainsIgnoreCase, VerifyValueDoesNotContain, VerifyValues, VerifyValuesIgnoreCase, VerifyValuesNotEqual, WaitForGUI, WebDriver
_getMappedValue, _getVariable, _processArgs, _resolveDDVariables, _setVariable, action, actionGUILess, autorun, back, combineParams, command, debug, error, forward, getAllowExit, getExitCode, getRunner, iDriver, normalizeTextForInput, quote, quotePath, replaceSeparator, setAllowExit, setExitCode, setLeveledTest, setNormalizeTextForInput, setRunner, testStatusCode
public static final java.lang.String TYPE
protected Component libComponent
public static int MAX_TRY_DEFAULT
protected int maxRetry
protected void initComponent(org.openqa.selenium.WebElement we) throws SeleniumPlusException
SeleniumPlusException
protected boolean highlight()
initComponent(WebElement)
after the libComponent
has been initialized.protected boolean clearHighlight()
protected boolean doSetText(java.lang.String libName, java.lang.String text, boolean isCharacter, boolean needVerify) throws SeleniumPlusException
libName
- String, the name of the library, like "EditBox", "CheckBox" etc.text
- String, the characters or keys to inputisCharacter
- boolean, if the text should be input as characters or as keysneedVerify
- boolean, if need to verify the text has been input correctlySeleniumPlusException
protected void setText(java.lang.String libName, boolean isCharacter, java.lang.String text) throws SeleniumPlusException
libName
- String, the concrete Component name of class, which calls 'setText()' method, like 'EditBox', 'ComboBox'.isCharacter
- boolean, if true, the text'll be treated as plain text, without special key dealing; if false, the text'll be treated as special keys.text
- String, the content to be entered into Component box.SeleniumPlusException
protected java.lang.String getType()
protected void process(java.lang.String action, java.lang.String criteria, int nthMatched, java.util.List<java.lang.String> parameters, java.lang.String customerType) throws SAFSException
action
- String, the action to performcriteria
- String, the search-conditions helping to find the componentnthMatched
- int, 1-based index, the Nth matched component if there are multiple components matching the search criteria.parameters
- ListcustomerType
- String, the customer-defined type for matching component.SAFSException
- if target object cannot be found, or the keyword is not supported, or any exception has been met.protected void process(java.lang.String action, java.lang.String criteria, int nthMatched, java.util.List<java.lang.String> parameters) throws SAFSException
action
- String, the action to performcriteria
- String, the search-conditions helping to find the componentnthMatched
- int, 1-based index, the Nth matched component if there are multiple components matching the search criteria.parameters
- ListSAFSException
- if target object cannot be found, or the keyword is not supported, or any exception has been met.protected void process(java.lang.String action, Criteria criteria, int nthMatched, java.util.List<java.lang.String> parameters) throws SAFSException
action
- String, the action to performcriteria
- Criteria, the search-conditions helping to find the componentnthMatched
- int, 1-based index, the Nth matched component if there are multiple components matching the search criteria.parameters
- ListSAFSException
- if target object cannot be found, or the keyword is not supported, or any exception has been met.protected boolean ignoreCache(java.lang.String action)
protected void localProcess(java.lang.String action, java.util.List<java.lang.String> parameters) throws SAFSException
action
- String, the action to performparameters
- ListSAFSException
- if target object cannot be found, or the action is not supported, or any exception has been met.protected java.awt.Point checkForCoord(java.lang.String coordinate)
protected java.awt.Rectangle getComponentRectangle()
protected Criteria generateCriteria(java.lang.String recognitionString)
recognitionString
- String, it can be
TypeRegistryConfiguration.SEPARATOR_WIN_COMP
.
protected Criteria generateCriteria(java.lang.String recognitionString, java.lang.String customerType)
recognitionString
- String, it can be
TypeRegistryConfiguration.SEPARATOR_WIN_COMP
.
customerType
- String, the customer-defined type for matching component.Copyright © SAS Institute. All Rights Reserved.