I want to hide using webdriver In FireFox it looks:
option = webdriver.FirefoxOptions()
option.set_preference('dom.webdriver.enabled', False)
So, i want know hot it make in Chrome? Is it possible?
You can set the window position outside your monitor, something like this
browser = webdriver.Chrome()
browser.set_window_position(-10000,0)
Set headless
to True
:
from selenium import webdriver
options = webdriver.ChromeOptions()
options.headless = True
driver = webdriver.Chrome(executable_path = 'chromedriver.exe', options=options)
options = webdriver.ChromeOptions()
options.add_argument('headless')
options.add_argument('window-size=1920x1080')
driver = webdriver.Chrome('chromedriver', chrome_options=options)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.