2

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

hek2mgl
  • 143,113
  • 25
  • 227
  • 253
Amal Antony
  • 6,001
  • 12
  • 51
  • 75
  • 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.
  • 59,901
  • 24
  • 121
  • 211
Cybermaxs
  • 24,048
  • 8
  • 80
  • 111