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.
Current Directory
Hi,
I want to get current directory path in script,
Please help me to get the directory path when i m executing my script
Thanks
Vikky
I want to get current directory path in script,
Please help me to get the directory path when i m executing my script
Thanks
Vikky
This discussion has been closed.
Comments
Do you want the current directory from which the process is running (which would be sahi/userdata/bin) or the current directory of the script? The current full path of the script can be got by _scriptPath() API
var $path = _scriptPath();
_alert($path);
Regards,
Narayan
Thanks for your reply
I need the path till script folder
I dont need script name.
"c:\automation\sahi\userData\script\"
Is it possible or i should use _scriptPath() and split as per my requirement.
Thanks
Vikram
My issue is solved with your reply.
Thank you so much. I get the path through _scriptPath() and split it as per requirement.
"Thank you so much for your response.
Vikky