能不能把开启headless模式加入到confrun.py配置内呢?
zhybangbang opened this issue · comments
Dylan commented
虫师 commented
@zhybangbang 支持的,在 confrun.py
如下配置,edge 浏览器为例:
#confrun.py
from selenium.webdriver import EdgeOptions
def browser():
"""
配置浏览器
"""
edge_option = EdgeOptions()
edge_option.add_argument('--headless=new')
browser_conf = {
"browser": "edge",
"options": edge_option
}
return browser_conf