我對硒和python都很陌生。硒腳本中的Python腳本
我從硒IDE導出腳本,當我試圖在Python中執行腳本我收到如下錯誤,
EException AttributeError: "'Service' object has no attribute 'log_file'" in <bo
und method Service.__del__ of <selenium.webdriver.firefox.service.Service object
at 0x0000000002AA4550>> ignored
======================================================================
ERROR: test_sharepoint_python (__main__.SharepointPython)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\scripts\sharepoint python1.py", line 12, in setUp
self.driver = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py",
line 139, in __init__
self.service = Service(executable_path, log_path=log_path)
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\service.py", li
ne 45, in __init__
log_file = open(log_path, "a+")
IOError: [Errno 13] Permission denied: 'geckodriver.log'
----------------------------------------------------------------------
Ran 1 test in 0.030s
FAILED (errors=1)
請指導我怎樣才能解決這個問題。看過其他帖子提及更新geckodriver的路徑。如果解決了這個問題,讓我知道哪裏可以找到geckodriver。但我不能在任何地方視圖嘗試geckodriver.log下載和安裝geckodriver但EXE不執行
可能的重複[Permission denied:'geckodriver.log'while python run selenium webdriver](http://stackoverflow.com/questions/40466809/permission-denied-geckodriver-log-while-running-selenium-webdriver -in-python) – Andersson