我对Selenium有几个疑问。
考虑以下情况:
机器A:由command=注册为集线器
java -jar selenium-server-standalone-2.44.0.jar -role hub机器B:有Windows 7和chrome浏览器
由command=java -Dwebdriver.chrome.driver="path of chrome driver" –jar selenium-server-standalone-2.44.0.jar –role webdriver –hub http://ipnameofHub:4444/grid/register -port 5566注册为节点
机器C:有Windows7和chrome浏览器
command=java -Dwebdriver.chrome.driver="path of chrome driver" –jar selenium-server-standalone-2.44.0.jar –role webdriver –hub http://ipnameofHub:4444/grid/register -port 5566注册为节点
机器D:有Windows 7和chrome浏览器
command=java -Dwebdriver.chrome.driver="path of chrome driver" –jar selenium-server-standalone-2.44.0.jar –role webdriver –hub http://ipnameofHub:4444/grid/register -port 5566注册为节点
DesiredCapabilities dc=new DesiredCapabilities();
dc.setBrowserName("chrome");
dc.setPlatform(Platform.WINDOWS);
WebDriver driver=new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),dc);当我运行一个测试时,哪个节点将选择哪个节点,以及基于哪个节点,因为所有节点都具有与DesiredCapabilities中指定的相同的平台和浏览器。
是随机选择节点还是选择与DesiredCpabilities匹配的第一个节点?
问题2
如果我想在特定的机器D上运行一个测试,这是如何做到的。
提前谢谢。
发布于 2018-03-05 12:44:35
https://stackoverflow.com/questions/49106062
复制相似问题