I use nodejs selenium-standalone and I have:
1) selenium-standalone running on Mac with role=hub
2) selenium-standalone running on Mac with role=node (to run tests on local Mac browsers)
3) Windows 10 installed on parallels desktop with selenium-standalone running with role=node
4) IE11 is configured regarding this article https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration
I have gridUrl config in my test (yandex gemini) and when I set it to windows node url (http://10.211.55.4:5555/wd/hub) IE11 test works fine. But when I set gridUrl to correct value (means local grid hub 127.0.0.1:4444/wd/hub) then IE11 opens stuck at "This is the initial start page for the WebDriver server." and "Only local connections are allowed" in the console. All other windows browsers in this case work fine (chrome, firefox, edge). No any errors in mac selenium grid hub console or in windows selenium node console - seems like grid hub somehow incorrectly trying to call windows node IEDriver.
Command to start selenium:
1) MacOS hub:
java -jar 3.8.1-server.jar -role hub
2) Windows10 node:
java -jar 3.8.1-server.jar -role node -hub http://192.168.1.4:4444/grid/register
After this, I can see all nodes and browsers on MacOS http://127.0.0.1:4444/grid/console.
I use selenium 3.8.1, IEdriver x64 3.8.0
MacOS hub terminal screenshot:
Windows node cmd screenshot:
MacOS grid hub console screenshot with config:
MacOS grid hub console screenshot:
DEBUG mode output of hub and node:
Windows node console output on success (direct connection without using grid hub):
2018-01-21 22:07:43.348:INFO:osjshC.ROOT:qtp31280858-9: org.openqa.selenium.remote.server.WebDriverServlet-11d44a3: Initialising WebDriverServlet
22:07:43.379 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@1f51925
22:07:43.379 INFO - /session: Executing POST on /session (handler: BeginSession)
22:07:43.458 INFO - Capabilities are: Capabilities {browserName: internet explorer, javascriptEnabled: true, platform: WINDOWS, version: }
22:07:43.458 INFO - Capabilities {browserName: internet explorer, javascriptEnabled: true, platform: WINDOWS, version: } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.ie.InternetExplorerDriverService)
Started InternetExplorerDriver server (64-bit)
3.8.0.0
Listening on port 3512
Only local connections are allowed
22:07:43.770 DEBUG - CookieSpec selected: default
22:07:43.770 DEBUG - Auth cache not set in the context
22:07:45.551 INFO - Detected dialect: W3C
22:07:45.598 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:45.598 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/window/current/size (handler: ServicedSession)
22:07:45.770 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:45.770 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:45.833 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:45.833 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/moveto (handler: ServicedSession)
22:07:45.865 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:45.865 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/url (handler: ServicedSession)
22:07:46.428 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:46.428 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:46.489 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:46.489 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:46.552 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:46.552 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:46.615 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:46.615 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:47.208 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.208 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing GET on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/screenshot (handler: ServicedSession)
22:07:47.301 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.301 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:47.349 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.349 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing GET on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/screenshot (handler: ServicedSession)
22:07:47.520 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.520 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:47.599 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.599 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing GET on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/screenshot (handler: ServicedSession)
22:07:47.771 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.786 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:47.833 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.833 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing GET on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/screenshot (handler: ServicedSession)
22:07:48.567 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:48.567 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing DELETE on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (handler: ServicedSession)
22:07:48.598 INFO - Removing session org.openqa.selenium.remote.server.ServicedSession@c91496
Windows node console output on fail (connection via mac grid hub):
2018-01-21 22:14:36.612:INFO:osjshC.ROOT:qtp29933260-14: org.openqa.selenium.remote.server.WebDriverServlet-1474f18: Initialising WebDriverServlet
22:14:36.628 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@1f793e6
22:14:36.628 INFO - /session: Executing POST on /session (handler: BeginSession)
22:14:36.721 INFO - Capabilities are: Capabilities {browserName: internet explorer, javascriptEnabled: true, platform: WINDOWS, version: }
22:14:36.721 INFO - Capabilities {browserName: internet explorer, javascriptEnabled: true, platform: WINDOWS, version: } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.ie.InternetExplorerDriverService)
22:14:36.752 DEBUG - Waiting for [http://localhost:15388/status]
22:14:36.752 DEBUG - Polling http://localhost:15388/status
Started InternetExplorerDriver server (64-bit)
3.8.0.0
Listening on port 15388
Only local connections are allowed
22:14:37.269 DEBUG - Polling http://localhost:15388/status
22:14:37.269 DEBUG - sun.net.www.MessageHeader@14906bf5 pairs: {GET /status HTTP/1.1: null}{User-Agent: Java/1.8.0_161}{Host: localhost:15388}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
22:14:37.269 DEBUG - sun.net.www.MessageHeader@4b81f27 pairs: {null: HTTP/1.1 200 OK}{Content-Length: 185}{Content-Type: application/json; charset=UTF-8}{Cache-Control: no-cache}{Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept}{Accept-Ranges: bytes}{Connection: close}
22:14:37.283 DEBUG - CookieSpec selected: default
22:14:37.283 DEBUG - Auth cache not set in the context
22:14:37.283 DEBUG - Connection request: [route: {}->http://localhost:15388][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000]
22:14:37.283 DEBUG - Connection leased: [id: 2][route: {}->http://localhost:15388][total kept alive: 0; route allocated: 1 of 2000; total allocated: 1 of 2000]
22:14:37.283 DEBUG - Opening connection {}->http://localhost:15388
22:14:37.283 DEBUG - Connecting to localhost/127.0.0.1:15388
22:14:37.283 DEBUG - Connection established 127.0.0.1:52058<->127.0.0.1:15388
22:14:37.283 DEBUG - http-outgoing-2: set socket timeout to 10800000
22:14:37.283 DEBUG - Executing request POST /session HTTP/1.1
22:14:37.283 DEBUG - Target auth state: UNCHALLENGED
22:14:37.283 DEBUG - Proxy auth state: UNCHALLENGED
22:14:37.283 DEBUG - http-outgoing-2 >> POST /session HTTP/1.1
22:14:37.283 DEBUG - http-outgoing-2 >> Content-Type: application/json; charset=utf-8
22:14:37.283 DEBUG - http-outgoing-2 >> Content-Length: 364
22:14:37.283 DEBUG - http-outgoing-2 >> Host: localhost:15388
22:14:37.283 DEBUG - http-outgoing-2 >> Connection: Keep-Alive
22:14:37.283 DEBUG - http-outgoing-2 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_161)
22:14:37.283 DEBUG - http-outgoing-2 >> Accept-Encoding: gzip,deflate
22:14:37.283 DEBUG - http-outgoing-2 >> "POST /session HTTP/1.1[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Content-Type: application/json; charset=utf-8[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Content-Length: 364[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Host: localhost:15388[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Connection: Keep-Alive[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_161)[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Accept-Encoding: gzip,deflate[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "{[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " "desiredCapabilities": {"browserName":"internet explorer","javascriptEnabled":true,"platform":"WINDOWS","version":""},[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " "capabilities": {[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " "desiredCapabilities": {"browserName":"internet explorer","javascriptEnabled":true,"platform":"WINDOWS","version":""},[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " "firstMatch": [[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " {"browserName":"internet explorer","platformName":"windows"}[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " ][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " }[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "}"
22:14:38.833 DEBUG - http-outgoing-2 << "HTTP/1.1 200 OK[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Content-Length: 692[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Content-Type: application/json; charset=UTF-8[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Cache-Control: no-cache[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Accept-Ranges: bytes[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Connection: close[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "{"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"internet explorer","browserVersion":"11","pageLoadStrategy":"normal","platformName":"windows","proxy":{},"se:ieOptions":{"browserAttachTimeout":0,"elementScrollBehavior":0,"enablePersistentHover":true,"ie.browserCommandLineSwitches":"","ie.ensureCleanSession":false,"ie.fileUploadDialogTimeout":3000,"ie.forceCreateProcessApi":false,"ignoreProtectedModeSettings":false,"ignoreZoomSetting":false,"initialBrowserUrl":"http://localhost:15388/","nativeEvents":true,"requireWindowFocus":false},"setWindowRect":true,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}},"sessionId":"3aba8a66-2b37-4516-b16c-b34acaea1555"}}[\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << HTTP/1.1 200 OK
22:14:38.833 DEBUG - http-outgoing-2 << Content-Length: 692
22:14:38.833 DEBUG - http-outgoing-2 << Content-Type: application/json; charset=UTF-8
22:14:38.833 DEBUG - http-outgoing-2 << Cache-Control: no-cache
22:14:38.833 DEBUG - http-outgoing-2 << Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
22:14:38.833 DEBUG - http-outgoing-2 << Accept-Ranges: bytes
22:14:38.833 DEBUG - http-outgoing-2 << Connection: close
22:14:38.833 DEBUG - http-outgoing-2: Close connection
22:14:38.833 DEBUG - Connection discarded
22:14:38.833 DEBUG - Connection released: [id: 2][route: {}->http://localhost:15388][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000]
22:14:38.848 INFO - Detected dialect: W3C
22:14:38.864 DEBUG - Executing: newSession [null, newSession {desiredCapabilities=Capabilities {acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:ieOptions: {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: true, ie.browserCommandLineSwitches: , ie.ensureCleanSession: false, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: false, ignoreZoomSetting: false, initialBrowserUrl: http://localhost:15388/, nativeEvents: true, requireWindowFocus: false}, setWindowRect: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}}}]
22:14:38.864 DEBUG - Executed: [null, newSession {desiredCapabilities=Capabilities {acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:ieOptions: {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: true, ie.browserCommandLineSwitches: , ie.ensureCleanSession: false, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: false, ignoreZoomSetting: false, initialBrowserUrl: http://localhost:15388/, nativeEvents: true, requireWindowFocus: false}, setWindowRect: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}}}]
22:14:40.676 DEBUG - CookieSpec selected: default
22:14:40.676 DEBUG - Auth cache not set in the context
HUB
andNODE
along with your code trials? – Auramine192.168.1..4
looks like a internal address, Windows node IP address10.211.55.4
looks like a public address, And you set grid hub address to127.0.0.1
– Gallardjava -jar selenium-server-standalone-3.8.1.jar -role node -hub 192.168.1.4:4444/grid/register -browser "browserName=internet explorer" -Dwebdriver.ie.driver=<replace to the absolute path of your iedriver.exe on Windows machine>
– Gallardhttp://127.0.0.1:4444/grid/console
– Amaryl