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.

How to record adding value in read-only calender field ?

Hi All,

I am facing a problem in the playback after recording the entry of date in a read-only calender field.

There is a field called 'Close date' (it's a mandatory field) which when clicked opens a calender with the current month and year open. The user has to chose a date and it gets entered in the mm/dd/yy format in the field. When I picked a date 12th September, 2014 the generated script was like this -

_setSelected(_select("wfListName"), "Workflow - 4th Sept");
_setSelected(_select("statusList"), "Duplicate");
_click(_div("Continue"));
_setValue(_textbox("opportunity_amount"), "1000");
_click(_link("12")); <
This is the line where date was recorded.
_click(_div("Save[3]"));
_click(_div("Save[3]"));

Now when I play back the script it fails at the line _click(_link("12")); and the log says -

_setSelected(_select("wfListName"), "Workflow - 4th Sept") [5781 ms] [02:56:28.234]
_setSelected(_select("statusList"), "Duplicate") [859 ms] [02:56:29.093]
_click(_div("Continue")) [422 ms] [02:56:29.515]
_setValue(_textbox("opportunity_amount"), "1000") [15313 ms] [02:56:44.828]
_click(_link("12")) Error: The parameter passed to _click was not found on the browser [0 ms] [02:57:05.640]

Please let me know how to enter value in this read-only calender field so that the play back does exactly the same thing.

Best Answer

  • Hi,

    You can make the read only field to editable by removing the attribute of "readOnly" and then can use set the date value as you set in textbox. This is just a workaround

    Regards,
    Bhavitha

Answers

  • Thanks for your comments Bhavitha. This may be a good idea. However, in our application it is a read-only field and I would not prefer to tweak it at this point of time. I will wait a bit more if some other idea comes up from this forum. If not, then I will ultimately have to use it as a last resort.
Sign In or Register to comment.