robotFramework运行时报错[1021/161731.893:ERROR:gl_surface_egl.cc(699)] EGL Driver message (Error) eglQueryDeviceAttribEXT: Bad attribute.

命令行运输robot脚本时一直报错,浏览器关闭后才没有报错信息了
[1021/161731.893:ERROR:gl_surface_egl.cc(699)] EGL Driver message (Error) eglQueryDeviceAttribEXT: Bad attribute.

解决办法:

chrome版本较高,禁用GPU加速

chrome_opt = webdriver.ChromeOptions()
chrome_opt.add_argument('--disable-gpu')
 path = r"D:/tools/chromedriver/chromedriver.exe"
 driver = webdriver.Chrome(executable_path=path,chrome_options=chrome_opt)

  

原文地址:https://www.cnblogs.com/xiaoyujade/p/13853306.html