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

Using Selenium with the new Telerik Date Controls

1 Answer 104 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Rupa
Top achievements
Rank 1
Rupa asked on 26 Jul 2012, 02:07 PM
Hello!

I am the only QA tester in my company, and also in charge of creating automated tests.  Since we're a small company, we're cutting costs as much as we can, without compromising quality, ease of work, productivity, etc.  Which is why we use the free open source Selenium automated test scripting, since it's free compared with the thousands we would have to pay for Telerik automated testing package and training.  

Anyways, I used to use the old Telerik date controls for Selenium automated tests where the date in dd/mm/yyyy format (this is in the UK) would be typed in by the Selenium scripts.  And when the Next button was clicked, the data was processed and the next page would appear and the scripts would continue working.  However, with the new Telerik date control, even when the Selenium scripts enter a proper dd/mm/yyyy date and then the Next button is clicked, the date fields become blank and error messages like, "Please enter date" appear, and the scripts fail.  Why is this happening?  The old Telerik controls worked just fine with the automated Selenium scripts where you just type in a date in dd/mm/yyyy format.  Why is this not working now?  Any ideas?  Anyone struggling with this?  There are a few date fields we use in our system, and so it would be rather tedious to type in dates manually every single time when scripts fail, I make them pause, quickly enter the dates, and resume automated testing.  Please advise me when convenient.  Thanks a lot!  

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 31 Jul 2012, 08:23 AM
Hello Rupa,

Note that by design RadInput controls set their value after they are blurred. Based on that I suspect that the problem is caused by the fact that the post back occurs fast enough so that the control does not mannage to set its value on time. The easiest resolution is to ensure that the input is blurred before the post back is triggered. For example you can explicitly focus another control and then trigger the postback.

I hope this helps.

All the best,
Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Calendar
Asked by
Rupa
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or