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.

scriptName not returning current script

bagsmodebagsmode Members
edited November -1 in Sahi - Open Source
I'm including script2 inside script1, but when I do _scriptName() within script2, scriptName is returning the name of script1, not script2..? Is this expected? If so, what can I do to get the name of the inner script, script2?

Comments

  • its expected, _scriptName() returns the name of the current script. The include is just copied into the current script.
  • so I have to hardcode the name of the included script if I want to do a _log of that script name, eh?
  • yeah :)
    but I wonder.. why don't your run the included scripts one after another in a suite? What benefit do you get from including them?
Sign In or Register to comment.