BeautifulReport
BeautifulReport copied to clipboard
你好,目前使用chrome的handless配置回报一个NoneType的错误,使用有界面的就不会,不知道大家有遇到过么
这个是driver配置
def hanless_chrome(self):
opt = Options()
opt.add_argument('--no-sandbox') # 解决DevToolsActivePort文件不存在的报错
opt.add_argument('window-size=1920x3000') # 指定浏览器分辨率
opt.add_argument('--disable-gpu') # 谷歌文档提到需要加上这个属性来规避bug
opt.add_argument('--hide-scrollbars') # 隐藏滚动条, 应对一些特殊页面
opt.add_argument('blink-settings=imagesEnabled=false') # 不加载图片, 提升速度
opt.add_argument('--headless')
driver = webdriver.Chrome(chrome_options=opt)
return driver
主文件BeautifulReport的189行outputBuffer这个值是个NoneType类型所以找不到getValue的方法
请指教