2016-12-14 2 views
0

Я пытаюсь использовать Selenium Grid 3.0.1 с Firefox 47 на OS X. /Applications/Firefox.app - это Firefox 50. /Applications/Firefox 47.app - это Firefox 47. Независимо от того, что я пытаюсь, Selenium запускает /Applications/Firefox.app.Selenium Grid запускает неправильную версию Firefox

Я запустил автономный сервер в режиме концентратора.

$ java -jar ~/Downloads/selenium-server-standalone-3.0.1.jar -role hub 
14:54:03.419 INFO - Selenium build info: version: '3.0.1', revision: '1969d75' 
14:54:03.420 INFO - Launching Selenium Grid hub 
2016-12-14 14:54:04.042:INFO::main: Logging initialized @946ms 
14:54:04.052 INFO - Will listen on 4444 
2016-12-14 14:54:04.093:INFO:osjs.Server:main: jetty-9.2.15.v20160210 
2016-12-14 14:54:04.120:INFO:osjsh.ContextHandler:main: Started [email protected]{/,null,AVAILABLE} 
2016-12-14 14:54:04.141:INFO:osjs.ServerConnector:main: Started [email protected]{HTTP/1.1}{0.0.0.0:4444} 
2016-12-14 14:54:04.142:INFO:osjs.Server:main: Started @1046ms 
14:54:04.142 INFO - Nodes should register to http://192.168.1.10:4444/grid/register/ 
14:54:04.142 INFO - Selenium Grid hub is up and running 

А затем настроить узел с помощью Firefox 47.

$ java -jar ~/Downloads/selenium-server-standalone-3.0.1.jar -role node -browser browserName=firefox,version=47,firefox_binary=/Applications/Firefox\ 47.app/Contents/MacOS/firefox-bin 
14:55:14.887 INFO - Selenium build info: version: '3.0.1', revision: '1969d75' 
14:55:14.888 INFO - Launching a Selenium Grid node 
2016-12-14 14:55:15.470:INFO::main: Logging initialized @854ms 
14:55:15.505 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: 
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC 
14:55:15.505 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped: 
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC 
14:55:15.506 INFO - Driver class not found: com.opera.core.systems.OperaDriver 
14:55:15.506 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped: 
Unable to create new instances on this machine. 
14:55:15.506 INFO - Driver class not found: com.opera.core.systems.OperaDriver 
14:55:15.506 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered 
2016-12-14 14:55:15.535:INFO:osjs.Server:main: jetty-9.2.15.v20160210 
2016-12-14 14:55:15.560:INFO:osjsh.ContextHandler:main: Started [email protected]{/,null,AVAILABLE} 
2016-12-14 14:55:15.587:INFO:osjs.ServerConnector:main: Started [email protected]{HTTP/1.1}{0.0.0.0:5555} 
2016-12-14 14:55:15.587:INFO:osjs.Server:main: Started @971ms 
14:55:15.587 INFO - Selenium Grid node is up and ready to register to the hub 
14:55:15.612 INFO - Starting auto registration thread. Will try to register every 5000 ms. 
14:55:15.612 INFO - Registering the node to the hub: http://localhost:4444/grid/register 
14:55:15.657 INFO - The node is registered to the hub and ready to use 
14:55:25.822 INFO - SessionCleaner initialized with insideBrowserTimeout 0 and clientGoneTimeout 1800000 polling every 180000 

я проверить через http://localhost:4444/grid/console, что сетка видит этот узел.

Концентратор видит запрос для Firefox 47.

14:56:23.028 INFO - Got a request to create a new session: Capabilities [{acceptSslCerts=true, browserName=firefox, javascriptEnabled=true, version=47, platform=ANY}] 
14:56:23.029 INFO - Trying to create a new session on test slot {firefox_binary=/Applications/Firefox 47.app/Contents/MacOS/firefox-bin, seleniumProtocol=WebDriver, browserName=firefox, version=47, platform=MAC} 

И так же узел, но он запускает Firefox.app вместо этого.

14:56:23.041 INFO - Executing: [new session: Capabilities [{acceptSslCerts=true, browserName=firefox, javascriptEnabled=true, version=47, platform=ANY}]]) 
14:56:23.049 INFO - Creating a new session for Capabilities [{acceptSslCerts=true, browserName=firefox, javascriptEnabled=true, version=47, platform=ANY}] 
1481756183115 geckodriver INFO Listening on 127.0.0.1:19913 
14:56:23.141 INFO - Attempting bi-dialect session, assuming Postel's Law holds true on the remote end 
1481756183145 mozprofile::profile INFO Using profile path /var/folders/0b/7xp2lxbd7yl0tcpms06fr3d40000gn/T/rust_mozprofile.zhTJMwOyP59u 
1481756183151 geckodriver::marionette INFO Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin 

Что происходит?

ответ

0

Вы можете попробовать инициализировать двоичный файл firefox в DesiredCapabilities;

DesiredCapabilities capabilities = new DesiredCapabilities(); 
    capabilities.setCapability(CapabilityType.BROWSER_NAME, "firefox"); 
    capabilities.setCapability("firefox_binary", "{Full path to firefox binary}"); 
    capabilities.setCapability("marionette", false); 
    driver = new RemoteWebDriver(new URL("http://" + host + ":" + port + "/wd/hub"), capabilities); 
+0

Это похоже на Java? Я использую клиент Perl, но имел эквивалент, как вы можете видеть из строки Capabilities в журналах хаба и узла ... кроме настройки 'marionette' на' false'. Что это делает? – Schwern

+1

Вместо указания пути браузера Firefox в командной строке для узла попробуйте указать путь при вызове браузера во время выполнения. marionette = False используется для Firefox 47. –

Смежные вопросы