Search code examples
pythonfirefoxwindows-8firefox-marionette

error 10061 trying to start session on marionette_client


This simple script in marionette from http://marionette-client.readthedocs.org/en/latest/ cannot connect (fails with connection denied)

from marionette import Marionette
client = Marionette(host='localhost', port=2828)
client.start_session()

I already tried to replace localhost with '127.0.0.1' and other ports but I got the same results.
I'm using Windows 8.1
Error:

socket.error: [Errno 10061] No se puede establecer una conexión ya que el equipo
 de destino denegó expresamente dicha conexión

Solution

  • I needed to enable marionette features on firefox using the command line:

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -marionette
    

    https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/Builds