Windows Vista Beta | WinVistaBeta.com - Message | UI Automation - Automation Element

July 25, 2008  
Subject: UI Automation - Automation Element
Group: microsoft.public.windows.developer.winfx.fundamentals
Date: 6/19/2007 6:07:06 AM
From: =?Utf-8?B?U2F0aHlh?= [Email Address Protection]

I am using UI Accessibility - UI Automation framework to write automation of
UI elements.

I have a label control for which the control type is displayed as "text".
In the production UI, the label has a click event associated. Upon clicking
the label control, another form is opened.

While trying to automate this scenario, I am not able to click on the label
control. I tried to set the focus on the label control and perform the
sendkeys. While trying to set focus, I am getting an exception as the focus
could not be set on the label control.

In my windows form, I have a simple button control (focused by default) and
a label.

Is there an alternative approach in invoking the click event on label
control as the invoke pattern is not available for the "text" control types?

Any help would be appreciated.

Back