Tools tips in windows?
I am experimenting with RPA.windows. I don't grok the robot syntax at all I'd rather use pure python but I don't grok the python API either yet and it isn't as well documented.
Looking with accessiblity insights I see some text called "FullDescription" which corresponds to a tooltip but there is no matching attribute if I list the attributes of that element.
Are there some limitations to robot here or is there a way to get this? An example of an element with this is the find button in a word document.
Here is a hacky script to list the attributes via RPA.Windows
from RPA.Windows import Windows
lib=Windows()
tree = lib.print_tree("class:NetUIRibbonButton", return_structure=True)
p.pprint(tree)
items = lib.get_elements("class:NetUIRibbonButton")
p.pprint(items);
for item in items:
attributes = lib.list_attributes(item)
p.pprint(attributes);
for attr in attributes:
p.pprint(attr);
result = lib.get_attribute("class:NetUIRibbonButton", attr)
if result is not None:
print("attr={}".format(result))
This isn't a great example as "NetUIRibbonButton" might correspond to other elements. Though it reproduces the error on the custom application I'm looking at where the element is sufficiently unique.
I also tried using the automation id as a locator for this example like "id:NavigationPaneFind" and it doesn't work. What are some more correct ways to do this?
Anyway this lists the attributes as:
[ 'AcceleratorKey',
'AccessKey',
'AriaProperties',
'AriaRole',
'AutomationId',
'BoundingRectangle',
'ClassName',
'ControlType',
'ControlTypeName',
'CreateControlFromControl',
'CreateControlFromElement',
'Culture',
'Element',
'FrameworkId',
'HasKeyboardFocus',
'HelpText',
'IsContentElement',
'IsControlElement',
'IsDataValidForForm',
'IsEnabled',
'IsKeyboardFocusable',
'IsOffscreen',
'IsPassword',
'IsRequiredForForm',
'ItemStatus',
'ItemType',
'LocalizedControlType',
'Name',
'NativeWindowHandle',
'Orientation',
'ProcessId',
'ProviderDescription',
'ValidKeys',
'foundIndex',
'regexName',
'robocorp_click_offset',
'searchDepth',
'searchFromControl',
'searchInterval',
'searchProperties']
None seem to correspond to "FullDescription".