This is a migrated thread and some comments may be shown as answers.

Testing with White

3 Answers 123 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 09 Mar 2011, 02:26 PM

We use "White" for our UI testing.
I can not find my RadMaskedTextBox by its AutomationId that is a control's name for WPF controls.
TextBox myTextBox = _myWindow.Get<TextBox>("textBoxName"); 

 

All RadMaskedTextBox have the same AutomationId and it is "PART_ExtendedTextBox"
Does anybody use "White" for UI tests? How do you work around this?

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 14 Mar 2011, 02:07 PM
Hello Sergey,

With the Beta release we introduced a new set of MaskedInput controls with improved automation support. You can examine them in this demo and read more info about their properties here.

Also, you should keep in mind that when you define a Name for those controls, it is used as an AutomationId so you should be able to use them with the White framework for UI testing.

Give them a try and let us know how it goes.

Best wishes,
Tina Stancheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Sergey
Top achievements
Rank 1
answered on 22 Mar 2011, 01:09 PM
How to get this Beta? What are the plans for release?
I also just had the same issue with DateTimePicker - no disrinctive AutomationID.
Exposes PART name instead.
0
Boyan
Telerik team
answered on 23 Mar 2011, 10:41 AM
Hello Sergey,

We release the RadMaskedInput controls with the official Q1 2011 release last week. You can download the controls from your account and give them a try.

Now to your problem. White is using UI automation and although most of our controls support UI automation (have Automation peers) the mentioned ones RadMaskedTextBox and DateTimePicker still doesn't. So I believe this is your problem. White framework detects the first known element and this is Textbox which is in the template of the Control and its Name in the template is "PART_DateTimeInput" and as all the DateTimePickers has the same template here is the same name for all. However I can't think of a way to workaround this. We are constantly working on improving the UI Accessibility of the controls however I can't give you an exact time when Automation Peers will be implemented for this two controls. Here you can check the current accessibility of Telerik controls:
http://www.telerik.com/help/wpf/ui_automation_support.html

I noticed that you company has some licenses for WebUI Test Studio that I suppose is used for testing ASP.NET and Silverlight applications. I want to inform you that the next major release of the tool WPF testing will be supported as well. The release is scheduled for the end of April.

Don't hesitate to contact us if you have other questions.


Kind regards,
Boyan
the Telerik team
Tags
General Discussions
Asked by
Sergey
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Sergey
Top achievements
Rank 1
Boyan
Telerik team
Share this question
or