ui自动化,不显示UI界面运行

from selenium import webdriver

from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument('--headless')
driver = webdriver.Chrome(chrome_options = chrome_options)
driver.get('https://www.baidu.com')
print(driver.page_source)

 

posted @ 2020-09-08 17:24  程程111  阅读(409)  评论(0编辑  收藏  举报