📜  在不打开浏览器的情况下运行 selenium webdriver - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:43.195000             🧑  作者: Mango

代码示例3
from selenium import webdriver   # for webdriver
from selenium.webdriver.support.ui import WebDriverWait  # for implicit and explict waits
from selenium.webdriver.chrome.options import Options  # for suppressing the browser

option = webdriver.ChromeOptions()
option.add_argument('headless')
driver = webdriver.Chrome('path/to/chromedriver',options=option)