Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好,目前使用chrome的handless配置回报一个NoneType的错误,使用有界面的就不会,不知道大家有遇到过么 #25

Open
BingzhangGithub opened this issue Dec 7, 2018 · 0 comments

Comments

@BingzhangGithub
Copy link

这个是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
image
主文件BeautifulReport的189行outputBuffer这个值是个NoneType类型所以找不到getValue的方法
请指教

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant