Unanswered question

Pass arguments to main method in java_test_script?

I am working on a project to execute Selenium scripts from Neoload using Actions>java_test_script. I have created the executable jar file with main method and tried calling the local jar file passed in as an argument. So far so good. Now I have the need to pass in a variable from Neoload to the Selenium Script. Is there a way to pass in a parameter as n argument to main method in the java script from Neoload?

Rahul N.
Rahul N.

Rahul N.

1 / 100


I've not coded in Java for a while so the syntax will be wrong but yes, in a java program, you will have a public void main(args) {}

args is an array so args[0] would be the first argument, 1 the second etc.