docs » cp.ui.axutils
Utility functions to support hs._asm.axuielement
- Functions - API calls offered directly by the extension
- cache
- childAtIndex
- childFromLeft
- childFromRight
- childFromTop
- childMatching
- childrenMatching
- childrenWith
- childrenWithRole
- childWith
- childWithDescription
- childWithID
- childWithRole
- isValid
| Signature | cp.ui.axutils.cache(source, key, finderFn, [verifyFn]) -> axuielement |
|---|---|
| Type | Function |
| Description | Checks if the cached value at the source[key] is a valid axuielement. If not |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childAtIndex(element, index, compareFn) -> axuielement |
|---|---|
| Type | Function |
| Description | Searches for the child element which is at number index when sorted using the compareFn. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childFromLeft(element, index) -> axuielement |
|---|---|
| Type | Function |
| Description | Searches for the child element which is at number index when sorted left-to-right. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childFromRight(element, index) -> axuielement |
|---|---|
| Type | Function |
| Description | Searches for the child element which is at number index when sorted right-to-left. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childFromTop(element, index) -> axuielement |
|---|---|
| Type | Function |
| Description | Searches for the child element which is at number index when sorted top-to-botom. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childMatching(element, matcherFn) -> axuielement |
|---|---|
| Type | Function |
| Description | This searches for the first child of the specified element for which the provided function returns true. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childrenMatching(element, matcherFn) -> { axuielement } |
|---|---|
| Type | Function |
| Description | This searches for all children of the specified element for which the provided |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childrenWith(element, name, value) -> axuielement |
|---|---|
| Type | Function |
| Description | This searches for all children of the specified element which has an attribute with the matching name and value. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childrenWithRole(element, value) -> axuielement |
|---|---|
| Type | Function |
| Description | This searches for all children of the specified element which has an AXRole attribute with the matching value. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childWith(element, name, value) -> axuielement |
|---|---|
| Type | Function |
| Description | This searches for the first child of the specified element which has an attribute with the matching name and value. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childWithDescription(element, value) -> axuielement |
|---|---|
| Type | Function |
| Description | This searches for the first child of the specified element which has AXDescription with the specified value. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childWithID(element, value) -> axuielement |
|---|---|
| Type | Function |
| Description | This searches for the first child of the specified element which has AXIdentifier with the specified value. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.childWithRole(element, value) -> axuielement |
|---|---|
| Type | Function |
| Description | This searches for the first child of the specified element which has AXRole with the specified value. |
| Parameters |
|
| Returns |
|
| Signature | cp.ui.axutils.isValid(element) -> boolean |
|---|---|
| Type | Function |
| Description | Checks if the axuilelement is still valid - that is, still active in the UI. |
| Parameters |
|
| Returns |
|