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.

Need to generate an unique ID using date and time

rj412rj412 Members
edited November -1 in Sahi - Open Source
Need to generate an unique ID using date and time
can somebody please help and check the code below why this does not work in sahi?
Many thanks.

function getUniqueId () {
var $currentTime = new Date();
var $uniqueId =
currentTime.getFullYear() + '' +
currentTime.getMonth() + '' +
currentTime.getDate() + '' +
currentTime.getTime();

return uniqueId;
};

var $username = getUniqueID () ;
CreateUserLogin ( $username ) ;

Comments

This discussion has been closed.