I am developing a Jmeter beanshell script to work with Selenium. I decided to use the beanshell sampler so i can use java and selenium commands not accessible in the WDS interface.
My code work fine except for some String inputs. Here is a sample (torn down to barebones):
import org.openqa.selenium.chrome.ChromeOptions;
ChromeOptions options = new ChromeOptions();
options.addArguments("start-maximized");
and i get this error
2017/03/31 13:43:21 ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.openqa.selenium.chrome.ChromeOptions; debug(); ChromeOptions options . . . '' : Error in method invocation: Method addArguments( java.lang.String ) not found in class'org.openqa.selenium.chrome.ChromeOptions' 2017/03/31 13:43:21 WARN - jmeter.protocol.java.sampler.BeanShellSampler: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.openqa.selenium.chrome.ChromeOptions; debug(); ChromeOptions options . . . '' : Error in method invocation: Method addArguments( java.lang.String ) not found in class'org.openqa.selenium.chrome.ChromeOptions' 201
I see this similar in some other commands like sendkeys.
Why is this command not taking my String? I can run the full script and the browser opens file so i know selenium is setup with jmeter. It is just certain commands that use Strings that do this.
Thanks J