Jmeter Error - Simple Code is not running

39 views
Skip to first unread message

Raj Mehta

unread,
Feb 19, 2023, 11:41:36 PM2/19/23
to jmeter-plugins
ERROR c.g.j.p.w.s.WebDriverSampler: In file: inline evaluation of: ``WDS.sampleResult.sampleStart() WDS.browser.get('http://jmeter-plugins.org') WDS. . . . '' Encountered "WDS" at line 2, column 1.
in inline evaluation of: ``WDS.sampleResult.sampleStart() WDS.browser.get('http://jmeter-plugins.org') WDS. . . . '' at line number 2


Chrome - Version 110.0.5481.104
JAVA - java version "18.0.2" 2022-07-19


jmeter.png
jmeter2.png
jmeter1.png

Vincent Daburon

unread,
Feb 20, 2023, 3:32:39 AM2/20/23
to jmeter-plugins
Hi,
You choose the Beanshell language = Java 1.3, so you need to ending all lines with ;
And i think add some import package

May be if you choose javascript it will work.

Regards.
Vincent DAB.

DT

unread,
Feb 20, 2023, 6:20:50 AM2/20/23
to jmeter-plugins
This is not valid beanshell code.
  1. You need to end each line with a semicolon
  2. Strings need to use double quotation marks, single are for characters

WDS.sampleResult.sampleStart();
WDS.browser.get("http://jmeter-plugins.org");
WDS.sampleResult.sampleEnd();

You might want to switch to Groovy language, it's more relaxed when it comes to semicolons and quotation marks, moreover it's recommended scripting language since JMeter 3.1
Reply all
Reply to author
Forward
0 new messages