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.

Can we use Javascript api functions in sahi code directly?

hbabbarhbabbar Members
edited June 2013 in Sahi - Open Source
Hi
I have a function that has the input parameters like this:

createPlan($planName, $startDate, $endDate)

where startDate and endaDate are in the format MM DD YYYY. (eg. "May 11, 2013")

Now i need to use all the strings seperately. eg MM, DD, YYYY.

Can i use the split method of javascript in the sahi script directly like
var $month = $startDate.split(" ",1) ;

Best Answer

  • Hi

    yes you can.
    $dateFields="MM DD YYYY".split(" ");
    $month=$dateFields[0];
    

    Regards
    Wormi
Sign In or Register to comment.