Unless the WebDriver sampler API/design has changed in newer versions and you're using an older version, perhaps you are not using it the correct way, or rather at least not the normal way? Have you tried using it the normal way? As suggested by the tutorial/documentation:
http://jmeter-plugins.org/wiki/WebDriverTutorial/ http://jmeter-plugins.org/wiki/WebDriverSampler/ http://jmeter-plugins.org/wiki/ChromeDriverConfig/ It seems for the normal way, you configure ChromeDriverConfig element graphically/manually in JMeter, not from code (although there's no reason not to do it from code). Then you use the WebDriverSampler's object to work with WebDriver, not instantiate your own driver instance. So with the Chrome config defined manually in JMeter GUI, all your code needs to do are things like: var pkg = JavaImporter(org.openqa.selenium) var what = WDS.browser.findElement(pkg.By.id('what')) what.sendKeys(['tyres']) If it fails the normal way, it's a JMeter WebDriver plugin issue. If it just fails in your original code, then it's has to do with how you are calling WebDriver classes, but why go that route if you can take the normal route? On Wed, Feb 18, 2015 at 9:52 AM, Bob <[email protected]> wrote: > I wanted to use with WebDriver sampler, it supports only JavaScript. > > On 18/02/15 18:17, sebb wrote: > >> On 18 February 2015 at 11:52, Bob <[email protected]> wrote: >> >>> Hi, >>> >>> I wanted to convert Selenium Java code to JavaScript make it possible to >>> run >>> with JMeter >>> >> Why convert? >> >> The BeanShell sampler runs most Java code. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
