Unanswered question

How to define names for the neoload javascript files?

When we create a javascript file in NeoLoad, NeoLoad itself provides a name for the script js file. Is there a way that we can provide customized name for the files?

Shubhendu M.
Shubhendu M.

Shubhendu M.

Level
0
50 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

I'm not sure to understand. Are you talking about the default name "script" or something else?

Because you can obviously change the name of the Javascript action.

Shubhendu M.
Shubhendu M.

Shubhendu M.

Level
0
50 / 100
points

No. I am not talking about the default name "script". I am talking about the name of the corresponding file that gets created with name in format something like "jsAction_35948481-1f9f-4988-8dc4-da181f92343a.js" I tried renaming this file but I wasn't able to.

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

The JS file contains a UUID that is used internally NeoLoad so you can't change it. But what would be the need to modify it?

Shubhendu M.
Shubhendu M.

Shubhendu M.

Level
0
50 / 100
points

I need to use the functions I have written in one JS file in to another. I believe the way to do it is as follows:

var imported = context.createElement('script2');
imported.src = '/path/to/imported/script';
context.head.appendChild(imported);

Any other way to go about it?

christophe M.
christophe M.

christophe M.

Level
4
5000 / 5000
points
Team

The functions added as JS Libraries (menu Edit / JS Libraries) can be transparently used by all Javascript Actions in the project.