2

What is the equivalent of __filename variableof nodejs in Phantomjs? I would like to get the name of the currently executing script.

hek2mgl
  • 152,036
  • 28
  • 249
  • 266
Amal Antony
  • 6,477
  • 14
  • 53
  • 76
  • Does this help: http://stackoverflow.com/questions/1340872/how-to-get-javascript-caller-function-line-number-how-to-get-javascript-caller ? – hek2mgl Oct 22 '13 at 06:13

1 Answers1

1

You can get the current script name with phantom.scriptName or with system.args[0].

as said here

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
Cybermaxs
  • 24,378
  • 8
  • 83
  • 112