简体   繁体   English

Selenium Grid2 - 可以运行10个Chrome实例吗?

[英]Selenium Grid2 - Is it possible to run 10 Chrome instances?

Currently Selenium Grid2 running with the default config shows that it can run 5 firefox browsers, 5 chrome browsers and 1 IE. 目前使用默认配置运行的Selenium Grid2显示它可以运行5个firefox浏览器,5个chrome浏览器和1个IE浏览器。 With a max of 5 instances at the same time. 最多同时有5个实例。

How can I change this so that it runs 10 chrome instances at the same time? 如何更改此设置以便它同时运行10个chrome实例?

I have succesfully changed the maxsession parameter of the node with -maxSession 10 . 我已成功使用-maxSession 10更改了节点的maxsession参数。 However when I run 10 tests, the hub shows that 5 are in queue waiting to be executed. 但是,当我运行10次测试时,集线器显示5个队列正在等待执行。

I dont know if this matters or not, but the hub itself shows a maxSession params of 5. Yet this one I couldn't change. 我不知道这是否重要,但是中心本身显示了一个5的maxSession参数。但是这个我无法改变。

Any ideas on how to do this? 关于如何做到这一点的任何想法?

I figured it out: 我想到了:

run the node with the argument of MaxSession, and let the browser Configuration have the MaxInstances parameter, ie: 使用MaxSession参数运行节点,并让浏览器Configuration具有MaxInstances参数,即:

java -jar $JARFILE -Dwebdriver.chrome.driver=$CHROMEDRIVER -role webdriver -hub http://$HUB_IP:4444/grid/register -maxSession 10 -browser browserName=chrome,maxInstances=10"

pretty straightforward actually... 实际上很简单......

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

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