Test Automation for QuickInfo tooltip

SyntaxEditor for WPF Forum

Posted 3 years ago by Xinen Lee
Version: 16.1.0632
Avatar

Hi, 

I'm using Inspect to look at the QuickInfo tooltip but it can't be detected. I need to create test automation to verify its visibility, content and content formatting. 

Could you please assist?

Thanks!

Comments (9)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Xinen,

The quick info tip ends up rendering as a TextBlock within a Popup (which shows as a Window) in UIA.  We can't set any UIA properties on the Window that is generated by the Popup since that happens internal to WPF.  We will add a UIA peer for the control that wraps the TextBlock though so it will be clear that in Inspec, the Window that contains a new "intelliprompt quick info" is the quick info popup.  Then that will have a TextBlock in it with the content.  This will be in the next maintenance release and we'll do the same for parameter info and the completion list.


Actipro Software Support

Posted 3 years ago by Xinen Lee
Avatar

Thanks Actipro!

Posted 3 years ago by Xinen Lee
Avatar

Hi, thanks for implementing the UIA peers. However I'm still unable to see them through Inspect. How can I see the structure of UIA tree for the QuickInfo?

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

When I use VisualUIAVerify and its Ctrl "Hover Mode" feature and hover over the quick info, I can see it showing up.  Note that it's in a child Window of the main Window, since this it is a popup.

In Inspect it's a bit tougher.  You might need to activate hover mode there (which seems to only work for hovering over its toolbar) and show the quick info via the toolbar in our SDI Editor sample.  Then Alt+Tab back to inspect and hover over the refresh button.  You should see a window in there with quick info. I found it that way.


Actipro Software Support

Posted 3 years ago by Xinen Lee
Avatar

Thanks for your reply, the tooltip will disappear once I move the mouse, so it's not possible to hover over it. From your reply I've figured out how to see it in Inspect:

1. Put Inspect in focus - don't need to activate any of its modes at all

2. Hover over a word in SyntaxEditor to bring up QuickInfo tooltip

3. Inspect will still have keyboard focus - do ctrl+shift+5 to refresh the tree, and then down/right to navigate the tree and open the window with the quickinfo

Using this method, I found out that before build 633, the tooltip info could be found already, and it contained a textbox that had the text content as its Name. For build 633, the textbox has "HtmlContentProvider" as its Name, but does not provide any way to retrieve the text content. Hence it's not possible to verify that certain content was displayed.

At the very least we would need the Text to be exposed, ideally through the Text pattern and not as the Name of the textblock.

Also, it would be extremely helpful to expose the whole HTML as well so that we can also test the formatting (and color, bold/italics etc) of the displayed item. One way could be to expose it via the TextBlock's ItemStatus property. This way we can get both the Text via the Text pattern for a convenient verification, and the whole HTML via ItemStatus for a more thorough check.

Please let me know if this is feasible. Thanks!

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Xinen,

For the next maintenance release we will remove the automation Name being set to "HtmlContentProvider" so that the TextBlock.Text comes back through there.  We also will set the raw HTML to the ItemStatus property so that you'll have access to that too.


Actipro Software Support

Posted 3 years ago by Xinen Lee
Avatar

Thanks Actipro! It would be great to have both the text and the html.

 

To clarify, I encouraged using Text/Value to give the TextBlock.Text for the following reasons:

1. Name is usually used as one of the criteria to identify the UIObject. It is also easier to read in the Inspect UI tree when the Name describes the item, e.g. "QuickInfo", especially if there is no text in the control.

2. It is more consistent and user-friendly to get a text value of an UI Object through its Value/Text property than its Name property.

Posted 3 years ago by Xinen Lee
Avatar

Hi Actipro,

Thanks for your support for the QuickInfo tooltip. 

One observation we made is that, when we bring up the tooltip without the sample browser in focus, in the Inspect UI Automation tree, the tooltip appears under the Desktop pane ui object.

When we bring up the tooltip with the sample browser in focus and the caret within the word that gives the tooltip, in the Inspect UI Automation tree, the tooltip appears under the "Actipro Software WPF Controls" window ui object.

This makes it difficult and inconsistent for testing. Can we have the tooltip to appear under the application window regardless of focus?

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Xinen,

Sorry but after looking into this, we're not sure why that is happening.  We aren't setting anything in particular for the Popup's UIA.  That's how WPF is assigning the window UIA created for the popup for some reason.  We only set a UIA peer for the content (a WPF Control) of the popup created to host quick info.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.