问题
I'm trying to launch Firefox remotely on a windows machine from UNIX box using remotewebdriver
I am also starting the selenium node remotely using ssh(It starts fine) using Cygwin and OpenSSH.
(I've installed firefox in the path c:\cygwin64\home\Administrator\firefox)
I am launching the grid node using:
java -jar selenium-server-standalone-2.53.0.jar -role node -hub http://HUB_IP:4444/grid/register -port 5566 -Dwebdriver.gecko.driver=geckodriver.exe -Dwebdriver.firefox.bin="firefox/firefox.exe"
However, the execution gets stcuk at:
1486534648695 mozprofile::profile INFO Using profile path C:\cygwin64\tmp\rust_mozprofile.lpsQghom5pxe
1486534648699 geckodriver::marionette INFO Starting browser C:\cygwin64\home\Administrator\firefox\firefox.exe
1486534648719 geckodriver::marionette INFO Connecting to Marionette on localhost:57059
1486534650177 Marionette INFO Listening on port 57059
I can see the firefox process starts but browser does not launch and gets stuck.
(Tried the same for chrome, getting the same issue)
After waiting for a long time, node throws exception:,
A coding exception was thrown and uncaught in a Task.
Full message: TypeError: NetworkError when attempting to fetch resource.
Full stack:
EDIT:
I cannot launch Firefox/Chrome from Cygwin when I manually go to the installation path and give the command firefox.exe. This gets stuck as well but a process is started. This occurs only when I use a remote connection. Though, using Cygwin locally launches the browsers.
Is there a way to enable this?
来源:https://stackoverflow.com/questions/42106180/selenium-remotewebdriver-stuck-before-launching-browser