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.
Can i insert current time and date in a textbox
I need to insert current date and time , with a string in textbox , so that i can assert according to the timestamp ,, sahi records the typed string , but can we append date time with it
Comments
You could do
var $date = new Date();
_setValue(_textbox("xx"), "my string " + $date);
Cheers,
Narayan
_setValue(_textarea("question"), "mg" + $date);
I put this string in my script ,but it failed.
_setValue(_textarea("question"), "mg" + Fri Mar 05 2010 11:17:29 GMT+0530 (IST));
--Stopped Playback: FAILURE--
var $date = "" + new Date();
_setValue(_textarea("question"), "mg" + $date);
First converting $date to a string (by adding "") and then adding to mg.