0

I ran the following:

C:\Program Files\Mozilla Firefox>firefox -marionette

And firefox launches, and the command line is made available to me again. There is no response of:

… 1491228343089 Marionette INFO Listening on port 2828

as is documented here.

When I go to run marionette using python I execute the following:

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

And get back:

---------------------------------------------------------------------------
timeout                                   Traceback (most recent call last)
<ipython-input-4-383639021ded> in <module>()
----> 1 client.start_session()

C:\Users\%USER%\AppData\Local\conda\conda\envs\realestate27\lib\site-packages\marionette_driver\decorators.pyc in _(*args, **kwargs)
     26             # application, make sure to handle those correctly.
     27             m = _find_marionette_in_args(*args, **kwargs)
---> 28             m._handle_socket_failure()
     29 
     30     return _

C:\Users\%USER%\AppData\Local\conda\conda\envs\realestate27\lib\site-packages\marionette_driver\decorators.pyc in _(*args, **kwargs)
     21     def _(*args, **kwargs):
     22         try:
---> 23             return func(*args, **kwargs)
     24         except (socket.error, socket.timeout):
     25             # In case of socket failures which will also include crashes of the

C:\Users\%USER%\AppData\Local\conda\conda\envs\realestate27\lib\site-packages\marionette_driver\marionette.pyc in start_session(self, capabilities, timeout)
   1210             # In the case when Marionette doesn't manage the binary wait until
   1211             # its server component has been started.
-> 1212             self.raise_for_port(timeout=timeout)
   1213 
   1214         self.client = transport.TcpTransport(

C:\Users\%USER%\AppData\Local\conda\conda\envs\realestate27\lib\site-packages\marionette_driver\marionette.pyc in raise_for_port(self, timeout)
    708         if not connected:
    709             raise socket.timeout("Timed out waiting for connection on {0}:{1}!".format(
--> 710                 self.host, self.port))
    711 
    712     @do_process_check

timeout: Timed out waiting for connection on localhost:2828!

Has anyone else experienced this? What am I doing wrong?

jason m
  • 6,519
  • 20
  • 69
  • 122

1 Answers1

0

You probably already have an instance of firefox running thats why when you start firefox it opens a new window in the already running instance. What you need to do is start a new instance from another profile or exit firefox and then open it with the marionette option.

If you want to create a new profile you can run the command below and then profile manager starts where you can create a new profile.

firefox --new-instance -ProfileManager

Then you start firefox with the marionett option.

firefox --new-instance -P <NAME_OF_THE_NEW_PROFILE> -marionette
sgoza
  • 1
  • 1