简体   繁体   English

无法在 Windows 7 Enterprise 中运行 selenium chrome 无头模式

[英]unable to run selenium chrome headless mode in Windows 7 enterprise

I am trying to run selenium chrome headless mode in Windows7 enterprise edition.我正在尝试在 Windows7 企业版中运行 selenium chrome 无头模式。 I have:我有:

from selenium.webdriver.chrome.options import Options
options = Options()

options.add_argument('--headless')

options.add_argument('--disable-gpu')

options.add_argument('window-size = 1920,1080')

driver = webdriver.Chrome(executable_path="chromedriver.exe", options=options)

I get:我得到:

chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed

The same set of commands works perfectly on my mac book pro anyone knows why?同一组命令在我的 mac book pro 上完美运行有人知道为什么吗?

我认为你应该在这一行尝试使用完整的文件路径:

driver = webdriver.Chrome(executable_path="/full file path/chromedriver.exe", options=options)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM