public abstract class AutomationBase extends Object
| Modifier and Type | Field and Description |
|---|---|
protected UIAutomation |
automation |
protected AutomationElement |
element |
protected com.sun.jna.platform.win32.User32 |
user32 |
| Constructor and Description |
|---|
AutomationBase(AutomationElement element)
Constructor for the AutomationBase class
|
| Modifier and Type | Method and Description |
|---|---|
AndCondition |
createAndCondition(Condition condition1,
Condition condition2)
Creates an AND condition
|
AutomationIdCondition |
createAutomationIdPropertyCondition(String automationId)
Creats an automation ID property condition
|
ControlIdCondition |
createControlTypeCondition(int id)
Creates a control type property condition
|
FalseCondition |
createFalseCondition()
Creates a false condition
|
NameCondition |
createNamePropertyCondition(String name)
Creates a name property condition
|
OrCondition |
createOrCondition(Condition condition1,
Condition condition2)
Creates an OR condition
|
TrueCondition |
createTrueCondition()
Creates a true condition
|
protected List<AutomationElement> |
findAll()
Finds all of the elements that are associated with this element
|
protected List<AutomationElement> |
findAll(TreeScope scope)
Finds all of the elements that are associated with the given condition.
|
protected List<AutomationElement> |
findAll(TreeScope scope,
Condition condition)
Finds all of the elements that are associated with the given condition.
|
List<AutomationElement> |
findAllBuildCache(CacheRequest cacheRequest)
Find all, but from the cache
|
protected AutomationElement |
findFirst(TreeScope scope,
Condition condition)
Finds the first match for the condition
|
protected AutomationElement |
findFirstBuildCache(CacheRequest cacheRequest) |
String |
getAcceleratorKey()
Gets the current accelerator key for th element
|
String |
getAriaRole()
Gets the ARIA role of the element
|
com.sun.jna.platform.win32.WinDef.RECT |
getBoundingRectangle()
Gets the bounding rectangle of the control
|
com.sun.jna.platform.win32.WinDef.POINT |
getClickablePoint()
Gets a clickable point for the control
This is manufactured by getting the bouning rect and finding the middle point.
|
protected ExpandCollapse |
getExpandCollapsePattern()
Gets the expand/collapse pattern for this control
|
Object |
getFramework()
Gets the framework used by the element
|
String |
getFrameworkId()
Gets the current framework ID for the element
|
protected Grid |
getGridPattern()
Gets the grid pattern for this control
|
protected Invoke |
getInvokePattern()
Gets the invoke pattern for this control
|
String |
getItemStatus()
Gets the current item status
|
com.sun.jna.platform.win32.WinDef.HWND |
getNativeWindowHandle()
Get the native window handle
|
OrientationType |
getOrientation()
The current orientation of the element
|
Object |
getProcessId()
Gets the processID of the element
|
String |
getProviderDescription()
Gets the current provider description
|
protected Range |
getRangePattern()
Gets the rangevalue pattern for this control
|
int[] |
getRuntimeId()
Gets the runtime id
|
protected Selection |
getSelectionPattern()
Gets the selection pattern for this control
|
protected SelectionItem |
getSelectItemPattern()
Gets the selectItem pattern for this control
|
protected Table |
getTablePattern()
Gets the table pattern for this control
|
protected Text |
getTextPattern()
Gets the text pattern for this control
|
protected Toggle |
getTogglePattern()
Gets the toggle pattern for this control
|
protected Value |
getValuePattern()
Gets the value pattern for this control
|
protected Window |
getWindowPattern()
Gets the window pattern for this control
|
protected boolean |
isDockPatternAvailable() |
boolean |
isEnabled()
Is the control enabled
|
protected boolean |
isExpandCollapsePatternAvailable() |
protected boolean |
isGridItemPatternAvailable() |
protected boolean |
isGridPatternAvailable() |
protected boolean |
isInvokePatternAvailable() |
protected boolean |
isMultipleViewPatternAvailable() |
protected boolean |
isOffScreen()
Is the control off screen?
|
protected boolean |
isRangeValuePatternAvailable() |
protected boolean |
isScrollItemPatternAvailable() |
protected boolean |
isScrollPatternAvailable() |
protected boolean |
isSelectionItemPatternAvailable() |
protected boolean |
isSelectionPatternAvailable() |
protected boolean |
isTableItemPatternAvailable() |
protected boolean |
isTablePatternAvailable() |
protected boolean |
isTextPatternAvailable() |
protected boolean |
isTogglePatternAvailable() |
protected boolean |
isTransformPatternAvailable() |
protected boolean |
isValuePatternAvailable() |
protected boolean |
isWindowPatternAvailable() |
String |
name()
Gets the name associated with this element
|
void |
setName(String name)
Sets the name of the element
|
protected AutomationElement element
protected UIAutomation automation
protected final com.sun.jna.platform.win32.User32 user32
public AutomationBase(AutomationElement element)
element - Element to useprotected boolean isDockPatternAvailable()
protected boolean isExpandCollapsePatternAvailable()
protected boolean isGridItemPatternAvailable()
protected boolean isMultipleViewPatternAvailable()
protected boolean isInvokePatternAvailable()
protected boolean isGridPatternAvailable()
protected boolean isRangeValuePatternAvailable()
protected boolean isScrollPatternAvailable()
protected boolean isSelectionItemPatternAvailable()
protected boolean isScrollItemPatternAvailable()
protected boolean isWindowPatternAvailable()
protected boolean isTextPatternAvailable()
protected boolean isTableItemPatternAvailable()
protected boolean isTablePatternAvailable()
protected boolean isSelectionPatternAvailable()
protected boolean isTransformPatternAvailable()
protected boolean isTogglePatternAvailable()
protected boolean isValuePatternAvailable()
protected boolean isOffScreen()
public com.sun.jna.platform.win32.WinDef.POINT getClickablePoint()
public Object getProcessId()
public Object getFramework()
public String name()
public void setName(String name)
name - The name to be set.protected List<AutomationElement> findAll()
protected AutomationElement findFirst(TreeScope scope, Condition condition) throws ElementNotFoundException
scope - The scope of where to lookcondition - The condition to useElementNotFoundException - No elements foundprotected List<AutomationElement> findAll(TreeScope scope)
scope - The scope of where to lookpublic TrueCondition createTrueCondition()
public FalseCondition createFalseCondition()
public NameCondition createNamePropertyCondition(String name)
name - The name to usepublic AutomationIdCondition createAutomationIdPropertyCondition(String automationId)
automationId - The automation ID to usepublic ControlIdCondition createControlTypeCondition(int id)
id - The control type to usepublic OrCondition createOrCondition(Condition condition1, Condition condition2)
condition1 - First conditioncondition2 - Second conditionpublic AndCondition createAndCondition(Condition condition1, Condition condition2)
condition1 - First conditioncondition2 - Second conditionprotected List<AutomationElement> findAll(TreeScope scope, Condition condition)
scope - The scope of where to lookcondition - The condition to checkprotected SelectionItem getSelectItemPattern() throws PatternNotFoundException
Gets the selectItem pattern for this control
PatternNotFoundException - Pattern not foundprotected Selection getSelectionPattern() throws PatternNotFoundException
Gets the selection pattern for this control
PatternNotFoundException - Pattern not foundprotected Value getValuePattern() throws PatternNotFoundException
Gets the value pattern for this control
PatternNotFoundException - Pattern is not foundprotected Range getRangePattern() throws PatternNotFoundException
Gets the rangevalue pattern for this control
PatternNotFoundException - Pattern is not foundprotected Table getTablePattern() throws PatternNotFoundException
Gets the table pattern for this control
PatternNotFoundException - Pattern is not foundprotected Window getWindowPattern() throws PatternNotFoundException
Gets the window pattern for this control
PatternNotFoundException - Pattern is not foundprotected ExpandCollapse getExpandCollapsePattern() throws PatternNotFoundException
Gets the expand/collapse pattern for this control
PatternNotFoundException - Pattern is not foundprotected Grid getGridPattern() throws PatternNotFoundException
Gets the grid pattern for this control
PatternNotFoundException - Pattern is not foundprotected Toggle getTogglePattern() throws PatternNotFoundException
Gets the toggle pattern for this control
PatternNotFoundException - Pattern is not foundprotected Invoke getInvokePattern() throws PatternNotFoundException
Gets the invoke pattern for this control
PatternNotFoundException - Pattern is not foundprotected Text getTextPattern() throws PatternNotFoundException
Gets the text pattern for this control
PatternNotFoundException - Pattern is not foundpublic boolean isEnabled()
public com.sun.jna.platform.win32.WinDef.RECT getBoundingRectangle()
public com.sun.jna.platform.win32.WinDef.HWND getNativeWindowHandle()
public String getAriaRole()
public OrientationType getOrientation()
public int[] getRuntimeId()
throws sun.reflect.generics.reflectiveObjects.NotImplementedException
sun.reflect.generics.reflectiveObjects.NotImplementedException - Throws big error, so not implementedpublic String getFrameworkId()
public String getProviderDescription()
public String getItemStatus()
public String getAcceleratorKey()
public List<AutomationElement> findAllBuildCache(CacheRequest cacheRequest)
cacheRequest - The cache requestprotected AutomationElement findFirstBuildCache(CacheRequest cacheRequest) throws ElementNotFoundException
ElementNotFoundExceptionCopyright © 2016. All rights reserved.