Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium google colaboratory使用selenuum时出错_Selenium_Google Chrome - Fatal编程技术网

Selenium google colaboratory使用selenuum时出错

Selenium google colaboratory使用selenuum时出错,selenium,google-chrome,Selenium,Google Chrome,我想在Google Colaboratory上使用selenium。然而,错误代码 WebDriverException:消息:服务chromedriver意外退出。状态代码为:-6 出现了,我无法解决这个问题。 Python版本Python 3.6.9 chromedriver二进制==81.0.4044.20.0 import chromedriver_binary from selenium import webdriver from selenium.webdriver.chrome.o

我想在Google Colaboratory上使用selenium。然而,错误代码 WebDriverException:消息:服务chromedriver意外退出。状态代码为:-6 出现了,我无法解决这个问题。 Python版本Python 3.6.9 chromedriver二进制==81.0.4044.20.0

import chromedriver_binary
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
driver = webdriver.Chrome(options=options)

#指定したURLに遷移
driver.get("https://www.google.co.jp")
#ドライバーを閉じる
driver.quit()