selenium python脚本_selenium中的Python脚本

我对selenium和python都是新手。在

我已经从selenium IDE导出了脚本,当我试图用python执行脚本时,我收到了如下错误:EException AttributeError: "'Service' object has no attribute 'log_file'" in

und method Service.__del__ of

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)

请告诉我怎么才能修好这个。看过其他帖子提到更新壁虎之路。如果问题解决了,让我知道我在哪里找到壁虎河。但我看不到任何地方壁虎.log尝试下载并安装geckodriver,但exe未执行

你可能感兴趣的:(selenium,python脚本)