Перейти к содержимому

babkinav13

Регистрация: 18 окт 2016
Offline Активность: 04 ноя 2016 19:17
-----

Мои темы

Не работает Selenium в Python

18 октября 2016 - 15:56

Здравствуйте!
Нужна помощь в работе Selenium

Создаю стандартный скрипт:
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("http://www.python.org“)

а выдает ошибку:
Traceback (most recent call last):
File ”C:\Python35-32\lib\site-packages\selenium\webdriver\common\service.py“, line 64, in start
stdout=self.log_file, stderr=self.log_file)
File ”C:\Python35-32\lib\subprocess.py“, line 947, in __init__
restore_signals, start_new_session)
File ”C:\Python35-32\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: Не удается найти указанный файл

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Python35-32/PycharmProjects/untitled/selenium1.py”, line 3, in <module>
driver = webdriver.Firefox()
File “C:\Python35-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py”, line 135, in __init__
self.service.start()
File “C:\Python35-32\lib\site-packages\selenium\webdriver\common\service.py”, line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.

Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x00ABA3D0>>
Traceback (most recent call last):
File “C:\Python35-32\lib\site-packages\selenium\webdriver\common\service.py”, line 163, in __del__
self.stop()
File “C:\Python35-32\lib\site-packages\selenium\webdriver\common\service.py”, line 135, in stop
if self.process is None:
AttributeError: ‘Service’ object has no attribute ‘process’


Что может быть не так?