18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Automate Datetime Picker
Hello,
How to automate Datetimepicker in sahi. when I record script it only gives code as "_click(_imageSubmitButton("ctl00\$ContentPlaceHolder1\$ImgCal"));".
But after recording, I run same recorded script in that case sahi not set the value to that datetimepicker.
Please any one tell me how I can solve this problem.
Thanks,
Chaitanya
How to automate Datetimepicker in sahi. when I record script it only gives code as "_click(_imageSubmitButton("ctl00\$ContentPlaceHolder1\$ImgCal"));".
But after recording, I run same recorded script in that case sahi not set the value to that datetimepicker.
Please any one tell me how I can solve this problem.
Thanks,
Chaitanya
Best Answer
-
Hi Chaitanya,
What type of datetimepicker are you using? Can you provide with an example for the same?
Regards.
Answers
I am using standard datetimepicker, which is provided in .net
Regards.
I have tried to automate the datetimepicker examples on the following link and they work properly.
Can you please provide the page where the datetimepicker is giving you a problem so that I can look into it i.e. can you provide an example page and script that is failing for you?
Regards.
actual problem is I set the value for datetimepicker. but after moving to another control it clear the datetimepicker control.
Code Sample:
_setSelected(_select("ctl00\$ContentPlaceHolder1\$ddlYear"),"2014");
//Extra Click to Datetimepicker
_click(_textbox("ctl00_ContentPlaceHolder1_txtDate"));
_click(_imageSubmitButton("ctl00\$ContentPlaceHolder1\$ImgCal"));
_click(_div("25"));
_setValue(_textbox("ctl00\$ContentPlaceHolder1\$txtDate"), "25-Sep-2013");
_setValue(_textbox("ctl00\$ContentPlaceHolder1\$txtEvent"), "DDF");
_click(_link("Add"));