How to get the Tooltip text for test complete 14 and windows
After much trying to figure out how to get the tool tip text, this is what we found worked: 1. Add System.Windows.Controls.ToolTip to project: Double click on Project name in Project Workspace Click on Properties tab Go to Open Applications→ WPF Under the 'Compositecontrols' tab of WPF Controlsclick the Add button Addthe System.Windows.Controls.ToolTip class and check the Activecheckbox Save project 2.To view a tooltip inTestComplete'sObject Browser without moving the mouse while hovering: Open and size the test complete window and the application windows so they are both visible on your monitor Open the Object Browser tab of Test complete In the application window, hover the mouse on the desired tooltip Alt + Tab to change the window and go to the test complete window (use arrow keys to move from one window to another) Ctrl+R to refresh the Object Browser A PopupRoot type process should appear under the process you are running in your application Use the up and down arrow keys to traverse through the objects till you get past the tooltip object to the textblock object that has the text ( in some cases we had multiple textblocks) 3. Here is some sample Python code to get the tooltip text: tooltipText = [] ObjectName.HoverMouse(-1,-1) Delay(1500) Sys.Process("ProcessName").Refresh() popupRootChildren = Sys.Process("ProcessName").FindAllChildren("ClrClassName", "PopupRoot", 100) forpopupRootinpopupRootChildren: tooltip = popupRoot.FindChild("ClrClassName", "ToolTip", 100) if(tooltip.Exists): textblockChildren = tooltip.FindAllChildren("ClrClassName", "TextBlock", 100) for textblock in textblockChildren: tooltipText.append(textblock.Text.OleValue)2.7KViews1like1CommentRecognize tooltip for System.Windows.Controls.TextBlock
Hi there, I can't recognize tooltip forSystem.Windows.Controls.TextBlock I do have ToolTip Property (Object) for it, and there are a lot of info inside it, but I couldn't find nothing like wText or any other property or method to get plain text of tooltip. Please help me with it Thanks, Sergey2.1KViews0likes4Comments