1

I am automating the process of Ticket booking through www.irctc.co.in Till now I am able to login.. But when specifying ticket details in next form, I am not able to set the Journey Date field(Calender with text box) value..

I tried this

        wb.Document.GetElementById("stationFrom").SetAttribute("value", "testStation");
        wb.Document.GetElementById("stationTo").SetAttribute("value","testagain");

        wb.Document.GetElementById("JDatee1").InvokeMember("onfocus");
        wb.Document.GetElementById("JDatee1").SetAttribute("value", "05/31/2012");
        wb.Document.GetElementById("JDatee1").SetAttribute("CurrentDate", "31");
        wb.Document.GetElementById("JDatee1").SetAttribute("CurrentMonth", "05");
        wb.Document.GetElementById("JDatee1").SetAttribute("CurrentYear", "2012"); 
        wb.Document.GetElementById("JDatee1").InvokeMember("onblur");

But after submitting form, date field gets the today's date.. 

Rest of the field I am able to fill.. 
4

0 回答 0