我运行了以下内容:
C:\Program Files\Mozilla Firefox>firefox -marionette
Firefox 启动,命令行再次可供我使用。没有回应:
… 1491228343089 Marionette INFO 监听端口 2828
如此处所述。
当我使用 python 运行木偶时,我执行以下命令:
from marionette_driver.marionette import Marionette
client = Marionette('localhost',port=2828)
client.start_session()
回来:
---------------------------------------------------------------------------
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!
有没有其他人经历过这个?我究竟做错了什么?