Couldn't create UIItem for AutomationElement

Sep 1, 2009 at 7:13 PM
Edited Sep 1, 2009 at 7:14 PM

I am trying to get all Label controls within a Group using the following code on a Silverlight application:

var docForm = this._document.Get<GroupBox>("dataForm");
var labels = docForm.GetMultiple(SearchCriteria.ByControlType(typeof(Label)));

While the selection of the control is correct, the properties of the items are not initialized. I get these messages in the test log:

[2009-09-01 12:11:01,711][WARN ] Couldn't create UIItem for AutomationElement, AutomationId:, Name:Project Management, ControlType:edit, FrameworkId:Silverlight
[2009-09-01 12:11:01,717][WARN ] Couldn't create UIItem for AutomationElement, AutomationId:, Name:, ControlType:edit, FrameworkId:Silverlight
[2009-09-01 12:11:01,722][WARN ] Couldn't create UIItem for AutomationElement, AutomationId:, Name:Project Plan, ControlType:edit, FrameworkId:Silverlight
[2009-09-01 12:11:01,728][WARN ] Couldn't create UIItem for AutomationElement, AutomationId:, Name:Sarah Vowell, ControlType:edit, FrameworkId:Silverlight
[2009-09-01 12:11:01,748][WARN ] Couldn't create UIItem for AutomationElement, AutomationId:, Name:2009-05-15T00:00:00, ControlType:edit, FrameworkId:Silverlight
[2009-09-01 12:11:01,754][WARN ] Couldn't create UIItem for AutomationElement, AutomationId:, Name:md, ControlType:edit, FrameworkId:Silverlight
[2009-09-01 12:11:01,760][WARN ] Couldn't create UIItem for AutomationElement, AutomationId:, Name:2009-07-28T22:06:52.05, ControlType:edit, FrameworkId:Silverlight

I also noticed that the type of the label is WPFLabel. Is WPFLabel intended for use in Silverlight?

Sep 6, 2009 at 9:46 AM

looks like you are using silverlight 3. in which case you would have to check out the source code as the released version doesn't support version 3.