18 January 2026:


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.

Unable to select a particular date from Date Picker

BhavithaBhavitha Members
edited November -1 in Sahi - Open Source
OS Name:Windows 7
Browser : IE 8
Sahi : Build: 2010-11-03


Hi all,

I am unable to select a particular date from the Date Picker in our Application, where as i can select month and year but not able to click on the particular date,
Below is the code we are using:-

_click(_image("calendar.gif[3]"));
_setSelected(_select("MonSelect"), "Dec");
_setSelected(_select("YearSelect"), "2012");
var $tempdate= new Date();
var $day=$tempdate.getDate();
var $nextday=$day+1;
var $nextday1=""+$nextday;

_click(_cell($nextday1)); //Clicking of the day

But we are getting error in the reports as "Unspecified error."

When we tried the code " _click(_cell($nextday1));" in try catch statement, undefined exception is coming and thus script fails.
Also we observed that if we place the line with hardcoded value in try catch like
try
{
_click(_cell("14")); //day
}
we are able to select the date and proceed with the script, but we need to pass dynamic values as in the above.

I searched in the forum with the posts relating to date pickers,but it did not help for the date picker in our application.
Below is the code of datepicker used in our application for the reference:- <iframe width="174" height="189" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="<%=urlString%>/scripts/popcal/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; left:-500px; top:0px;"><LAYER name="gToday:normal:agenda.js" src="<%=urlString%>/scripts/popcal/ipopeng.htm"></LAYER></iframe>

Kindly help us with the solution

Thanks
Bhavitha
Sign In or Register to comment.