This question is locked. New answers and comments are not allowed.
I'm trying to automate a test of the RadDatePicker using WebAii and nUnit. I want to test the date formatting of the RadDatePicker. The following code works fine:
HtmlInputText dateBox = base.myManager.ActiveBrowser.Find.ById<HtmlInputText>"ctl00_ContentPlaceHolder1_DatePicker1_rdpCurrentDate_dateInput_text"); |
dateBox.Text = "Oct 11"; |
At this point in a manual scenario, if the user hits {ENTER} or clicks out of the RadDatePicker control the control's behind-the-scenes functionality formats the date to '10/11/2009'. But I can't figure out how to automate the triggering of this formatting functionality.
The following code clears the RadDatePicker control and opens a new browser:
ActiveBrowser.Manager.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Return); |
Automating a click away from the RadDatePicker control incites an error message saying that there are no active browsers:
ActiveBrowser.Find.ById<HtmlInputText>("ctl00_ContentPlaceHolder1_ctl00_dateInput_text").MouseClick(); |
There are no active browsers. Please make sure you have atleast one browser instance launched for automation using Manager.LauncheNewBrowser().
So, I'm stumped. Can you offer any advice?
Thanks!
David