Home > Back-end >  JavaScript not in list of Selenium Script Languages inside of JMeter
JavaScript not in list of Selenium Script Languages inside of JMeter

Time:06-15

I am wondering if anyone has seen this issue in JMeter where JavaScript is not an option in the Script Language drop-down of the Selenium WebDriver? The only options available to me are the ones on the screenshot below.

I have tried with Selenium 3.3 and 3.0 and the drop-down does not change and this is on Apache JMeter 5.4.3 under macOS Monterey.

Missing JavaScript option in JMeter

CodePudding user response:

This is because the Nashorn engine which gave the possibility to run JavaScript from Java has been deprecated removed from JDK you need to consider one of the following options:

  1. Downgrade your JDK to a lower version where Nashorn is still there (the minumum Java version which can run JMeter 5.4.3 is Java 8)
  2. Switch to GraalVM which comes with JavaScript scripting engine
  3. Switch to another language, since JMeter 3.1 you should be using Groovy as it provides maximum performance comparing to the other scripting options.
  • Related