Selenium怎样驱动Firefox浏览器

当然你得先下载谷歌驱动chromedriver.exe,安装selenium

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,executable_path = 'D:\APPS\dir\chromedriver.exe')

猜你喜欢

转载自www.cnblogs.com/ceshi168/p/11964219.html