[英]How to use selenium chrome options?
So I have had this code for sometime that worked without an issue for what I can recall.所以我已经有一段时间的这段代码了,我能回忆起它没有问题。 However, it has recently been raising an issue when I run it.但是,它最近在我运行它时引发了一个问题。 Here is the code这是代码
chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(options=chrome_options)
here is the error这是错误
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
First, you need to install ChromeDriver if it's not installed.首先,如果未安装 ChromeDriver,则需要安装它。 ( https://chromedriver.chromium.org/downloads ) ( https://chromedriver.chromium.org/downloads )
Then, you need to add it to the PATH environment variable and you're good to go!然后,您需要将其添加到 PATH 环境变量中,一切顺利!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.