0

In Jmeter after adding chrome driver support there is a proxy tab where we can give proxy. I am selecting SOCKS Proxy and giving the IP address as we are using tunneling and then connecting to a website.

While executing the test, I am getting the below error

2020年10月01日 10:52:30,746 ERROR o.a.j.t.JMeterThread: Error calling threadStarted
org.openqa.selenium.InvalidArgumentException: invalid argument: entry 0 of 'firstMatch' is invalid
from invalid argument: cannot parse capability: proxy
from invalid argument: Specifying 'socksProxy' requires an integer for **'socksVersion'**
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...
...
2020年10月01日 10:52:30,754 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'jp@gc - WebDriver Sampler'.
java.lang.IllegalArgumentException: Browser has not been configured. Please ensure at least 1 WebDriverConfig is created for a ThreadGroup.

I am not sure how to give socks version. I tried giving "SOCKS5127円.0.0.1" but no luck.

If someone who has experience in Jmeter with Socks5 proxy please help

asked Oct 1, 2020 at 5:32

1 Answer 1

1

I don't think current WebDriver Sampler implementation supports setting SOCKS proxy as it should be done via ChromeOptions and it's implemented via Capabilities

You can reach out to plugin developers/maintainers via jmeter-plugins support forum and ask to fix the issue (or you're welcome to contribute the fix yourself)

If this is something you cannot afford at the moment you can consider switching to JSR223 Sampler where you will have full control of how the browser is configured/started so you will be able to do something like:

System.setProperty('webdriver.chrome.driver', '/path/to/chromedriver')
def options = new org.openqa.selenium.chrome.ChromeOptions()
options.addArguments('--proxy-server=socks5://127.0.0.1:8080')
def chromedriver = new org.openqa.selenium.chrome.ChromeDriver(options)
chromedriver.get('http://example.com')

More information: Apache Groovy - Why and How You Should Use It

answered Oct 1, 2020 at 10:19
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.