Ich habe gerade mit der Arbeit an Selen begonnen. Aber ich habe dieses ProblemKann nicht mit Selen beginnen mit Python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 248, in get
self.execute(Command.GET, {'url': url})
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 234, in execute
response = self.command_executor.execute(driver_command, params)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/remote_connection.py", line 401, in execute
return self._request(command_info[0], url, body=data)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/remote_connection.py", line 431, in _request
self._conn.request(method, parsed_url.path, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 711, in create_connection
raise err
File "/usr/lib/python3.5/socket.py", line 702, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Ich habe versucht, im Internet suchen. Meine Versionen von Selen und Firefox sind aktuell. Da es nur der Anfang war, hatte ich drei einfache Zeilen aus dem Internet und versuchte das zu tun.
>>> from selenium import webdriver
>>> br = webdriver.Firefox()
>>> br.implicitly_wait(15)
>>> br.get('http://youtube.com')
haben Sie versucht Einstellung zuerst ein Firefox-Profils –
Mögliche Duplikat [kann nicht geöffnet Browser mit Selen nach Firefox-Update] (http? : //stackoverflow.com/questions/37761668/cant-open-browser-with-selenium-after-firefox-update) – Mobrockers