Home  >  Q&A  >  body text

python - selenium server 为什么会有geckodriver.exe错误

from selenium.webdriver import Remote
import time
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = Remote(command_executor='http://127.0.0.1:4444/wd/hub',
desired_capabilities={'platform': 'ANY',
                      'browserName':'firefox',
                      'version': '',
                      'javascriptEnabled': True})
driver.get('http://www.baidu.com')
title=driver.title
print (title)
time.sleep(3)
driver.quit()

我是这样写的

但在selenium server 出现错误:

编译器里也是同样的错误:

这是什么原因?

geckodriver.exe我也放到firefox目录了

怪我咯怪我咯2741 days ago580

reply all(0)I'll reply

No reply
  • Cancelreply