Добрый день,
Пытаюсь настроить Selenium Webdriver на двух машинах: с Win 7, IE9 и на Win XP, IE8.
Python скачала, packages заинсталила, selenium заинсталила. IEWebDriver лежит в папке прописанной в %PATH%
.
При попытке выполнить:
from selenium import webdriver
webdriver.Ie()
на обоих окружениях получаю error:
Traceback (most recent call last):
File "<pyshell#28>", line 1, in <module>
webdriver.Ie()
File "C:\Python27\lib\site-packages\selenium\webdriver\ie\webdriver.py", line 46, in __init__
self.iedriver.start()
File "C:\Python27\lib\site-packages\selenium\webdriver\ie\service.py", line 79, in start
raise WebDriverException("Can not connect to the IEDriver")
WebDriverException: Message: 'Can not connect to the IEDriver'*
если включить Bypass proxy server for local addresses в настройках IE, то exception:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
webdriver.Ie()
File "C:\Python27\lib\site-packages\selenium\webdriver\ie\webdriver.py", line 54, in __init__
desired_capabilities=capabilities)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 72, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 114, in start_session
'desiredCapabilities': desired_capabilities,
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 165, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 136, in check_response
raise exception_class(value)
WebDriverException: Message:
ERROR: The requested URL could not be retrieved
The requested URL could not be retrieved
While trying to retrieve the URL: http://127.0.0.1:3753/session
The following error was encountered
Connection to 127.0.0.1 Failed
The system returned:(111) Connection refused
The remote host or network may be down. Please try the request again.
Your cache administrator is webmaster
Generated Thu, 29 Aug 2013 16:58:39 GMT by xxproxycl02.xxx.org (squid/2.6.STABLE17)
сам IEDriver запускается нормально:
C:\Python27>IEDriverServer.exe
Started InternetExplorerDriver server (64-bit)
2.35.2.0
Listening on port 5555**
есть подозрения, что это из-за прокси, т.к. работает нормально на виртуалке (Win XP, IE7 and 8).
может кто-то сталкивался с подобной проблемой?