This random error message...
gl_surface_egl.cc(544) - EGL Driver message (Error) eglQueryDeviceAttribEXT: Bad attribute.
...is coming from the LogEGLDebugMessage()
method as there was an error with one of the GL Switches
This error is defined in gl_surface_egl.cc as follows:
static void EGLAPIENTRY LogEGLDebugMessage(EGLenum error,
const char* command,
EGLint message_type,
EGLLabelKHR thread_label,
EGLLabelKHR object_label,
const char* message) {
std::string formatted_message = std::string("EGL Driver message (") +
GetDebugMessageTypeString(message_type) +
") " + command + ": " + message;
Deep Dive
As per the documentation in List of Chromium Command Line Switches the argument --use-gl
selects which implementation of GL the GPU process should be used and the available options are:
- desktop: whatever desktop OpenGL the user has installed (Linux and Mac default).
- egl: whatever EGL / GLES2 the user has installed (Windows default - actually ANGLE).
- swiftshader: The SwiftShader software renderer.
This DEBUG message is not harmful and you can continue with your tests.
Solution
If your usecase involves invoking click()
or send_keys()
method, you need to induce WebDriverWait for the element_to_be_clickable()
as follows:
Invoking click()
:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "element_css"))).click()
Invoking send_keys()
:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "element_xpath"))).send_keys("Joseph Jones")
Additional consideration
Possibly this error is caused by the app getting launched by ES2-only
devices, even though the manifest requires ES
3 capability. Updating EGL_RENDERABLE_TYPE
from EGL_OPENGL_ES2_BIT
to EGL_OPENGL_ES3_BIT
will solve this issue.