简体   繁体   English

如何使用Jmeter WebDriver Sampler设置ChromeProfile?

[英]How to set ChromeProfile using Jmeter WebDriver Sampler?

Is it possible to set chrome profile capabilities? 可以设置Chrome配置文件功能吗?

something like 就像是

Wds.browser.options? 

using javascript Or by selenium greed node configuration? 使用javascript或通过selenium贪婪节点配置?

cant find any info. 找不到任何信息。

My Node options: 我的节点选项:

java -Dwebdriver.chrome.driver=D:\\apache-jmeter-4.0\\lib\\chromedriver.exe  -jar selenium-server-standalone3.14.0.jar -role node -hub http://localhost:9999/grid/register -maxSession 100 -browser browserName="chrome",version=ANY,platform=WINDOWS,maxInstances=50

You cannot unless you want to modify ChromeDriver Config according to your needs, recompile the plugin and replace the .jar under "lib/ext" folder of your JMeter instlalation. 除非您要根据需要修改ChromeDriver Config ,否则不能重新编译插件并替换JMeter安装的“ lib / ext”文件夹下的.jar。

Another option is use JSR223 Sampler instead of the WebDriver Sampler, in this case you will have full control over the WebDriver instance and be able to manipulate ChromeOptions , DesiredCapabilities and so on. 另一个选择是使用JSR223 Sampler而不是WebDriver Sampler,在这种情况下,您将完全控制WebDriver实例,并且能够操作ChromeOptionsDesiredCapabilities等。

Be aware that recommended language for JSR223 test element is Groovy 请注意,JSR223测试元素的推荐语言是Groovy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM