Unable to use Chrome with the Jmeter webdriver sampler, however the same code works fine for firefox

3,303 views
Skip to first unread message

ankur...@gmail.com

unread,
Oct 18, 2013, 12:25:34 AM10/18/13
to jmeter-...@googlegroups.com
Hello,
 
I am new to Jmeter and am facing an issue with the webdriver plugin in Jmeter.
I want to run performance tests on an application which renders on chrome, however i am facing an issue.
 
while searching the web i found a sample code for firefox which works with the webdriver sampler  and tried to run the same on google chrome however i failed to do so.
 
I followed the steps given on:
 
 
Now when i try the same with chrome after giving the proxy and chrome driver path, all that happens is that the browser opens up but nothing happens after that.
 
Do i need to do anything else as well in order to make it work with chrome ?
 
Thanks and Regards,
Ankur Mohal

Cheen-Pin Lim

unread,
Oct 18, 2013, 2:49:14 AM10/18/13
to jmeter-...@googlegroups.com

Hi

If you're using the current version of chrome you will need to make sure you're using chromedriver 2. Can you verify if you are using the correct version of chromedriver?

CP

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

ankur mohal

unread,
Oct 18, 2013, 6:23:18 AM10/18/13
to jmeter-...@googlegroups.com
Hello,
 
Thanks for the response.
 
I am using Chrome  Version 30.0.1599.101 m
and chrome driver version 2.4

 

Regards,
Ankur

ankur mohal

unread,
Oct 18, 2013, 6:59:09 AM10/18/13
to jmeter-...@googlegroups.com
Hello,
Thanks for the response.
I am using Chrome Version 30.0.1599.101 m
and chrome driver version 2.4
On Friday, 18 October 2013 12:19:14 UTC+5:30, CP Lim wrote:

Cheen-Pin Lim

unread,
Oct 19, 2013, 6:00:17 PM10/19/13
to jmeter-...@googlegroups.com

I'll have to have a closer look into it. Do you mind sending me your jmx file so I can see what may be experiencing?

ankur mohal

unread,
Oct 22, 2013, 5:42:48 AM10/22/13
to jmeter-...@googlegroups.com
Hello,

I was able to fix this issue. there was an issue with the proxy itself. Thanks for the response.

Regards,
Ankur Mohal


--
You received this message because you are subscribed to a topic in the Google Groups "jmeter-plugins" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jmeter-plugins/DOJ65WfxcXs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jmeter-plugin...@googlegroups.com.

Cheen-Pin Lim

unread,
Oct 22, 2013, 7:47:25 AM10/22/13
to jmeter-...@googlegroups.com

OK. Thanks for letting me know.

CP

aanchal.k...@gmail.com

unread,
Oct 21, 2015, 9:26:56 AM10/21/15
to jmeter-plugins
Hi Ankur,

I am also facing the same problem.
can you please let me know what changes you made in proxy?

Thanks
Aanchal Sharma

angela....@gmail.com

unread,
Sep 9, 2016, 4:13:59 AM9/9/16
to jmeter-plugins
I also facing the same problem. Could you please let me know your changes? 


Thanks
Angela

Eunice Lok

unread,
Nov 8, 2020, 10:19:28 PM11/8/20
to jmeter-plugins
Hi Ankur,

I faced the same issue too. Can you share the steps on how do you resolve it?

Thanks.

Regards,
Eunice

Swati Kakkar

unread,
Jan 20, 2023, 6:32:31 AM1/20/23
to jmeter-plugins
Hi,
I am facing one issue that when I run the webdriver sampler one extra chrome browser launches. Please suggest what changes should I do to correct it?

Liliane et Robert Bourgault du Coudray

unread,
Jan 20, 2023, 9:33:16 AM1/20/23
to jmeter-...@googlegroups.com
Hi Swati,
Can you check in jmeter.log how many threads have been started or for any other traces that may explain the launching of the 2nd instance?
Best is to attach the jmeter.log file so we can also see what's happening.
Regards,
Robert

George William

unread,
Feb 8, 2023, 3:23:05 PM2/8/23
to jmeter-plugins
Hello,

I am trying to set up Jmeter Webdriver sampler in Jmeter 5.5, Chrome version 110.0.5481.77-1 , Chromedriver version  110.0.5481.77 on a docker with ubuntu:22.10 

Below is the code for chrome and driver


RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
    && apt-get install -y ./google-chrome-stable_current_amd64.deb &&\
    CHROMEVER=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") && \
    echo "Using chrome version: "$CHROMEVER &&\
    DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") &&\
    echo "Using chromedriver version: "$DRIVERVER &&\
    wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" &&\
    unzip /chromedriver/chromedriver* -d /usr/bin/ && chmod +x /usr/bin/chromedriver

# Disable the SUID sandbox so that chrome can launch without being in a privileged container
RUN dpkg-divert --add --rename --divert /opt/google/chrome/google-chrome.real /opt/google/chrome/google-chrome \
    && echo "#!/bin/bash\nexec /opt/google/chrome/google-chrome.real --no-sandbox --disable-setuid-sandbox \"\$@\"" > /opt/google/chrome/google-chrome \
    && chmod 755 /opt/google/chrome/google-chrome


docker build is success.

While trying to run the JMX script below error is thrown

023-02-08 18:23:08,902 ERROR o.a.j.t.JMeterThread: Error calling threadStarted java.lang.IllegalStateException: The driver executable must exist: /opt/apache-jmeter-5.5    at org.openqa.selenium.internal.Require$FileStateChecker.isFile(Require.java:345) ~[selenium-api-4.7.2.jar:?]    at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:161) ~[selenium-remote-driver-4.7.2.jar:?]    at org.openqa.selenium.remote.service.DriverService$Builder.usingDriverExecutable(DriverService.java:369) ~[selenium-remote-driver-4.7.2.jar:?]    at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.getThreadService(ChromeDriverConfig.java:46) ~[jmeter-plugins-webdriver-4.7.2.jar:?]    at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.createBrowser(ChromeDriverConfig.java:26) ~[jmeter-plugins-webdriver-4.7.2.jar:?]    at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.createBrowser(ChromeDriverConfig.java:14) ~[jmeter-plugins-webdriver-4.7.2.jar:?]    at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.getPreparedBrowser(WebDriverConfig.java:215) ~[jmeter-plugins-webdriver-4.7.2.jar:?]    at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.threadStarted(WebDriverConfig.java:146) ~[jmeter-plugins-webdriver-4.7.2.jar:?]    at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:797) ~[ApacheJMeter_core.jar:5.5]    at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:993) ~[jorphan.jar:5.5]    at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:976) ~[jorphan.jar:5.5]    at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:765) ~[ApacheJMeter_core.jar:5.5]    at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:753) ~[ApacheJMeter_core.jar:5.5]    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:264) ~[ApacheJMeter_core.jar:5.5]    at java.lang.Thread.run(Thread.java:829) ~[?:?]

Tried my best placing the chromedriver file in

usr/local/bin/chromedriver
usr/bin/chromedriver
opt/apache-jmeter-5.5/bin

it don't work

Can somebody help me get out of this issue.

Liliane et Robert Bourgault du Coudray

unread,
Feb 8, 2023, 8:01:57 PM2/8/23
to jmeter-...@googlegroups.com
Hi George,
Did you specify the path tôo the Chromedriver in your JMeter test plan, in the Chrome Configuration? See attachment.
Otherwise, JMeter cannot guess where it is and it will fail (hence error: The driver executable must exist).


PathToDriver.PNG

DT

unread,
Feb 9, 2023, 12:55:20 AM2/9/23
to jmeter-plugins
You need to specify the path to the chromedriver binary, not the folder where it lives, but the real full or relative path.

/usr/bin/chromedriver
or
/opt/apache-jmeter-5.5/bin/chromedriver

In general using Selenium for load testing is not recommended either by Selenium or by JMeter Plugin vendors so I hope you know what you're doing, in the vast majority of cases unless you're measuring frontend performance you should be using HTTP Request samplers and configure JMeter to behave like a real browser 

vibhavari patil

unread,
Mar 15, 2023, 3:22:09 AM3/15/23
to jmeter-plugins

Hello,

I have done the below upgrade from plugins manager in Jmeter 5.5, Chrome version  11.0.5563.65  on windows. The script was running fine before upgrade, but after upgrading it started showing error for chromedriver. Script is working fine for edgedriver 

Upgrades asking in plugin manager -
Uninstall plugin: jpgc-plugins-manager 1.8
Uninstall plugin: jpgc-webdriver 4.6.0
Install library: selenium-edge-driver
Install plugin: jpgc-plugins-manager 1.9
Install plugin: jpgc-webdriver 4.8.0

Error code - 
Mar 15, 2023 12:15:33 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find CDP implementation matching 111
Mar 15, 2023 12:15:33 PM org.openqa.selenium.chromium.ChromiumDriver lambda$new$3
WARNING: Unable to find version of CDP to use for . You may need to include a dependency on a specific version of the CDP using something similar to `org.seleniumhq.selenium:selenium-devtools-v86:4.8.0` where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's.
Starting ChromeDriver 111.0.5563.64 (c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}) on port 33547
Mar 15, 2023 12:31:11 PM org.openqa.selenium.remote.http.WebSocket$Listener onError
WARNING: Invalid Status code=403 text=Forbidden
java.io.IOException: Invalid Status code=403 text=Forbidden
        at org.asynchttpclient.netty.handler.WebSocketHandler.abort(WebSocketHandler.java:92)
        at org.asynchttpclient.netty.handler.WebSocketHandler.handleRead(WebSocketHandler.java:118)
        at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
        at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Unknown Source)



Dmitri T

unread,
Mar 15, 2023, 4:33:51 AM3/15/23
to jmeter-plugins
It's neither related to JMeter nor to WebDriver Sampler, you're suffering from Selenium bug 11750

The workaround would be adding --remote-allow-origins=* argument under "Options" tab of the Chrome Driver Config

Otherwise downgrade your Chrome browser to 110 and the appropriate version of the ChromeDriver

Alternatively you can consider running your tests using Taurus framework, see Execute JMeter script Using Taurus for more details, Taurus will automatically download JMeter and the requred plugins/webdriver binaries

Liliane et Robert Bourgault du Coudray

unread,
Mar 15, 2023, 5:20:36 AM3/15/23
to jmeter-...@googlegroups.com
As Dmitri says, try adding the missing argument like this.


--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
ChromeOptions.PNG

Chaithanya Bharathi

unread,
Jul 14, 2023, 3:10:49 AM7/14/23
to jmeter-plugins
Hi 
 I am new to Jmeter
while running the Jmeter script I am facing these two issues. 
My Chrome version is: 114.0.5735.199
My  Chrome driver version is: 114.0.5735.16

javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler.setPath() is applicable for argument types: (null) values: [null]
Possible solutions: setName(java.lang.String), getName(), getAt(java.lang.String), iterator(), each(groovy.lang.Closure)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320) ~[groovy-jsr223-3.0.11.jar:3.0.11]
at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:71) ~[groovy-jsr223-3.0.11.jar:3.0.11]
at javax.script.CompiledScript.eval(CompiledScript.java:93) ~[java.scripting:?]
at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:217) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.modifiers.JSR223PreProcessor.process(JSR223PreProcessor.java:45) ~[ApacheJMeter_components.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.runPreProcessors(JMeterThread.java:978) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:561) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268) ~[ApacheJMeter_core.jar:5.5]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: groovy.lang.MissingMethodException: No signature of method: com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler.setPath() is applicable for argument types: (null) values: [null]
Possible solutions: setName(java.lang.String), getName(), getAt(java.lang.String), iterator(), each(groovy.lang.Closure)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70) ~[groovy-3.0.11.jar:3.0.11]
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) ~[groovy-3.0.11.jar:3.0.11]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) ~[groovy-3.0.11.jar:3.0.11]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) ~[groovy-3.0.11.jar:3.0.11]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139) ~[groovy-3.0.11.jar:3.0.11]
at Script10.run(Script10.groovy:4) ~[?:?]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) ~[groovy-jsr223-3.0.11.jar:3.0.11]
... 9 more
2023-07-14 12:30:03,249 ERROR c.g.j.p.w.s.WebDriverSampler: javax.script.ScriptException: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.openqa.selenium.support.ui.WebDriverWait(org.openqa.selenium.chrome.ChromeDriver, Long)
2023-07-14 12:30:03,249 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1
2023-07-14 12:30:03,249 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
2023-07-14 12:30:03,426 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2023-07-14 12:30:03,426 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

Thanks 
Chaithanya

Dmitri T

unread,
Jul 14, 2023, 5:16:58 AM7/14/23
to jmeter-plugins
It looks like you have a JSR223 PreProcessor  with the following Groovy code:

sampler.setPath('some path')

this code fails for the WebDriver Sampler because it doesn't provide setPath() function, you can either ignore this error or move your JSR223 PreProcessor to be a child of the Sampler which path you need to amend. See JMeter Scoping Rules for more details
Reply all
Reply to author
Forward
0 new messages