Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code

Awa*_*wad 4 jmeter jmeter-plugins jmeter-maven-plugin

I am trying to run a Jmeter test on remote machine ( macOS sierraO). I configured jp@gc - Chrome Driver Config and I can connect to the slave machine. However, whenever I try to run it I get

Starting ChromeDriver 73.0.3683.20 (XXXXXXX) on port XXXX
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Mar 08, 2019 12:12:35 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Using local port: XXXXXX
2019-03-08 13:04:39.171 java[10402:23852395] IMKInputSession [0x7f8bcbaaf740 presentFunctionRowItemTextInputViewWithEndpoint:completionHandler:] : [self textInputContext]=0x7f8bcbb578f0 *NO* NSRemoteViewController to client, NSError=Error Domain=NSCocoaErrorDomain Code=4099 "The connection from pid 0 was invalidated from this process." UserInfo={NSDebugDescription=The connection from pid 0 was invalidated from this process.}, com.apple.inputmethod.EmojiFunctionRowItem
Run Code Online (Sandbox Code Playgroud)

I know this is related to the security consideration, but I couldn't find a way to solve for my use case.

My use case is: I am running jmeter test using:

  1. Run remote server directly from Jmeter 5.1
  2. Run using java-maven-plguin project.

Any thoughts how to configure chromeDriver to run on remote server would be appreciated.

Suj*_*jit 6

租用ChromeDriver和相关测试框架使用的保护端口,以防止恶意代码访问。

解决方案:获取您的Chrome浏览器版本,然后下载特定于该版本的ChromeDriver。

打开您的Chrome浏览器>单击3个垂直点(右上角)>帮助>关于Google Chrome

验证Chrome版本(例如73或74或其他..)

转到Selenium浏览器驱动程序下载门户并下载该版本的Chrome驱动程序

https://sites.google.com/a/chromium.org/chromedriver/downloads


Awa*_*wad 5

我无法直接将任何参数传递给chromedriverfrom p@gc - Chrome Driver Config,我的配置如下所示:

chromedriver配置

在那里我chromedriver.dirchromedirver.dir=vu.chromedriver.dir=/path/to/chromedriver 不过,我能解决它通过添加:

  1. workaround.sh 对于macOS

    #!/usr/bin/env bash /path/to/chromedriver --whitelist-ip $*

  2. workaround.bat 对于Windows

    \\src\\path\\to\\chromedriver.exe --whitelist-ip %*

这就解决了我使chromedriver接受远程连接的问题。