What is the equivalent of __filename variableof nodejs in Phantomjs? I would like to get the name of the currently executing script.
You can get the current script name with phantom.scriptName or with system.args[0].
phantom.scriptName
system.args[0]
as said here