uiautomation
|
公開メンバ関数 | |
def | __init__ (self, textRange=None) |
bool | AddToSelection (self, float waitTime=OPERATION_WAIT_TIME) |
'TextRange' | Clone (self) |
bool | Compare (self, 'TextRange' textRange) |
int | CompareEndpoints (self, int srcEndPoint, 'TextRange' textRange, int targetEndPoint) |
bool | ExpandToEnclosingUnit (self, float waitTime=OPERATION_WAIT_TIME) |
'TextRange' | FindAttribute (self, int textAttributeId, val, bool backward) |
'TextRange' | FindText (self, str text, bool backward, bool ignoreCase) |
ctypes.POINTER(comtypes.IUnknown) | GetAttributeValue (self, int textAttributeId) |
List[Rect] | GetBoundingRectangles (self) |
List[ 'Control'] | GetChildren (self) |
'Control' | GetEnclosingControl (self) |
str | GetText (self, int maxLength=-1) |
int | Move (self, int unit, int count, float waitTime=OPERATION_WAIT_TIME) |
bool | MoveEndpointByRange (self, int srcEndPoint, 'TextRange' textRange, int targetEndPoint, float waitTime=OPERATION_WAIT_TIME) |
int | MoveEndpointByUnit (self, int endPoint, int unit, int count, float waitTime=OPERATION_WAIT_TIME) |
bool | RemoveFromSelection (self, float waitTime=OPERATION_WAIT_TIME) |
bool | ScrollIntoView (self, bool alignTop=True, float waitTime=OPERATION_WAIT_TIME) |
bool | Select (self, float waitTime=OPERATION_WAIT_TIME) |
公開変数類 | |
textRange | |
def uiautomation.uiautomation.TextRange.__init__ | ( | self, | |
textRange = None |
|||
) |
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationtextrange
bool uiautomation.uiautomation.TextRange.AddToSelection | ( | self, | |
float | waitTime = OPERATION_WAIT_TIME |
||
) |
Call IUIAutomationTextRange::AddToSelection. Add the text range to the collection of selected text ranges in a control that supports multiple, disjoint spans of selected text. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-addtoselection
'TextRange' uiautomation.uiautomation.TextRange.Clone | ( | self | ) |
Call IUIAutomationTextRange::Clone. return `TextRange`, identical to the original and inheriting all properties of the original. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-clone
bool uiautomation.uiautomation.TextRange.Compare | ( | self, | |
'TextRange' | textRange | ||
) |
Call IUIAutomationTextRange::Compare. textRange: `TextRange`. Return bool, specifies whether this text range has the same endpoints as another text range. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-compare
int uiautomation.uiautomation.TextRange.CompareEndpoints | ( | self, | |
int | srcEndPoint, | ||
'TextRange' | textRange, | ||
int | targetEndPoint | ||
) |
Call IUIAutomationTextRange::CompareEndpoints. srcEndPoint: int, a value in class `TextPatternRangeEndpoint`. textRange: `TextRange`. targetEndPoint: int, a value in class `TextPatternRangeEndpoint`. Return int, a negative value if the caller's endpoint occurs earlier in the text than the target endpoint; 0 if the caller's endpoint is at the same location as the target endpoint; or a positive value if the caller's endpoint occurs later in the text than the target endpoint. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-compareendpoints
bool uiautomation.uiautomation.TextRange.ExpandToEnclosingUnit | ( | self, | |
float | waitTime = OPERATION_WAIT_TIME |
||
) |
Call IUIAutomationTextRange::ExpandToEnclosingUnit. Normalize the text range by the specified text unit. The range is expanded if it is smaller than the specified unit, or shortened if it is longer than the specified unit. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-expandtoenclosingunit
'TextRange' uiautomation.uiautomation.TextRange.FindAttribute | ( | self, | |
int | textAttributeId, | ||
val, | |||
bool | backward | ||
) |
Call IUIAutomationTextRange::FindAttribute. textAttributeID: int, a value in class `TextAttributeId`. val: COM VARIANT according to textAttributeId? todo. backward: bool, True if the last occurring text range should be returned instead of the first; otherwise False. return `TextRange` or None, a text range subset that has the specified text attribute value. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-findattribute
'TextRange' uiautomation.uiautomation.TextRange.FindText | ( | self, | |
str | text, | ||
bool | backward, | ||
bool | ignoreCase | ||
) |
Call IUIAutomationTextRange::FindText. text: str, backward: bool, True if the last occurring text range should be returned instead of the first; otherwise False. ignoreCase: bool, True if case should be ignored; otherwise False. return `TextRange` or None, a text range subset that contains the specified text. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-findtext
ctypes.POINTER(comtypes.IUnknown) uiautomation.uiautomation.TextRange.GetAttributeValue | ( | self, | |
int | textAttributeId | ||
) |
Call IUIAutomationTextRange::GetAttributeValue. textAttributeId: int, a value in class `TextAttributeId`. Return `ctypes.POINTER(comtypes.IUnknown)` or None, the value of the specified text attribute across the entire text range, todo. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-getattributevalue
List[Rect] uiautomation.uiautomation.TextRange.GetBoundingRectangles | ( | self | ) |
Call IUIAutomationTextRange::GetBoundingRectangles. textAttributeId: int, a value in class `TextAttributeId`. Return List[Rect], a list of `Rect`. bounding rectangles for each fully or partially visible line of text in a text range.. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-getboundingrectangles for rect in textRange.GetBoundingRectangles(): print(rect.left, rect.top, rect.right, rect.bottom, rect.width(), rect.height(), rect.xcenter(), rect.ycenter())
List['Control'] uiautomation.uiautomation.TextRange.GetChildren | ( | self | ) |
Call IUIAutomationTextRange::GetChildren. textAttributeId: int, a value in class `TextAttributeId`. Return List[Control], a list of `Control` subclasses, embedded objects that fall within the text range.. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-getchildren
'Control' uiautomation.uiautomation.TextRange.GetEnclosingControl | ( | self | ) |
Call IUIAutomationTextRange::GetEnclosingElement. Return `Control` subclass, the innermost UI Automation element that encloses the text range. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-getenclosingelement
str uiautomation.uiautomation.TextRange.GetText | ( | self, | |
int | maxLength = -1 |
||
) |
Call IUIAutomationTextRange::GetText. maxLength: int, the maximum length of the string to return, or -1 if no limit is required. Return str, the plain text of the text range. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-gettext
int uiautomation.uiautomation.TextRange.Move | ( | self, | |
int | unit, | ||
int | count, | ||
float | waitTime = OPERATION_WAIT_TIME |
||
) |
Call IUIAutomationTextRange::Move. Move the text range forward or backward by the specified number of text units. unit: int, a value in class `TextUnit`. count: int, the number of text units to move. A positive value moves the text range forward. A negative value moves the text range backward. Zero has no effect. waitTime: float. Return: int, the number of text units actually moved. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-move
bool uiautomation.uiautomation.TextRange.MoveEndpointByRange | ( | self, | |
int | srcEndPoint, | ||
'TextRange' | textRange, | ||
int | targetEndPoint, | ||
float | waitTime = OPERATION_WAIT_TIME |
||
) |
Call IUIAutomationTextRange::MoveEndpointByRange. Move one endpoint of the current text range to the specified endpoint of a second text range. srcEndPoint: int, a value in class `TextPatternRangeEndpoint`. textRange: `TextRange`. targetEndPoint: int, a value in class `TextPatternRangeEndpoint`. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-moveendpointbyrange
int uiautomation.uiautomation.TextRange.MoveEndpointByUnit | ( | self, | |
int | endPoint, | ||
int | unit, | ||
int | count, | ||
float | waitTime = OPERATION_WAIT_TIME |
||
) |
Call IUIAutomationTextRange::MoveEndpointByUnit. Move one endpoint of the text range the specified number of text units within the document range. endPoint: int, a value in class `TextPatternRangeEndpoint`. unit: int, a value in class `TextUnit`. count: int, the number of units to move. A positive count moves the endpoint forward. A negative count moves backward. A count of 0 has no effect. waitTime: float. Return int, the count of units actually moved. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-moveendpointbyunit
bool uiautomation.uiautomation.TextRange.RemoveFromSelection | ( | self, | |
float | waitTime = OPERATION_WAIT_TIME |
||
) |
Call IUIAutomationTextRange::RemoveFromSelection. Remove the text range from an existing collection of selected text in a text container that supports multiple, disjoint selections. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-removefromselection
bool uiautomation.uiautomation.TextRange.ScrollIntoView | ( | self, | |
bool | alignTop = True , |
||
float | waitTime = OPERATION_WAIT_TIME |
||
) |
Call IUIAutomationTextRange::ScrollIntoView. Cause the text control to scroll until the text range is visible in the viewport. alignTop: bool, True if the text control should be scrolled so that the text range is flush with the top of the viewport; False if it should be flush with the bottom of the viewport. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-scrollintoview
bool uiautomation.uiautomation.TextRange.Select | ( | self, | |
float | waitTime = OPERATION_WAIT_TIME |
||
) |
Call IUIAutomationTextRange::Select. Select the span of text that corresponds to this text range, and remove any previous selection. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-select
uiautomation.uiautomation.TextRange.textRange |