【发布时间】:2014-11-12 11:46:34
【问题描述】:
我正在尝试将 selenium 与 chrome 网络驱动程序一起使用。当我在没有选项的情况下运行它时,它工作正常:
>>>driver = webdriver.Chrome(executable_path=path)
但是当我像这样添加选项(加载的配置文件)时:
>>> options = webdriver.ChromeOptions()
>>> options.add_argument('--user-data-dir=%s' % chromeProfile)
>>> driver = webdriver.Chrome(executable_path=path,chrome_options=options)
它启动浏览器窗口,它看起来还活着,但命令会挂起,直到它最终声明:
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: u'unknown error: Chrome failed to start: exited normally\n (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64)'
什么可能导致这个问题,我该如何调试它?
谢谢
【问题讨论】:
标签: python google-chrome selenium