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

How to set date in RadMaskedDateTimeInput

1 Answer 60 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dumitru
Top achievements
Rank 1
Dumitru asked on 21 Aug 2012, 08:37 AM
Hi. 
The question is in the title. I tried to use TypeText method but looks like it's not working. There is a property Text, but it's read-only. Also I didn't found any examples with RadMaskedInput controls in the sample solution which installs with the framework. Maybe I am missing something: some property or method? please help.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 24 Aug 2012, 10:34 AM
Hello Dumitru,

You need to click in the Date Time text input field first, in order to set the focus on it and activate it. Then use the TypeText method and the value should be entered as expected.
 
Here's a sample code against this RadMaskedDateTimeInput demo:
SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
RadMaskedDateTimeInput dtInput = app.Find.ByAutomationId<RadMaskedDateTimeInput>("radMaskedDateTimeInput");
 
dtInput.MouseClick(MouseClickType.LeftClick, 1, true);
dtInput.TypeText("26082012", 10);

Please give it a try and let me know if you need further assistance on this.

Greetings,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Dumitru
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or