New issue
Advanced search Search tips

Issue 719202 link

Starred by 16 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

In headless mode I am unable to use Webdriver.sendkeys

Reported by justin.p...@ad-juster.com, May 7 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Example URL:
https://www.google.com/ddm/bidmanager/

Steps to reproduce the problem:
1. Start Headless ChromeDriver
2. Go to url "https://www.google.com/ddm/bidmanager/"
3. Find by id "Email" or "identifierId" (this is the text box for the username)
4. SeleniumService.sendKey (input the user name)

What is the expected behavior?
I expect it to input the username into the text box

What went wrong?
When I try and call Webdriver.sendkeys I am getting the error:
WebDriverException: unknown error: an X display is required for keycode conversions, consider using Xvfb

This is happening while running a python test and while running a test in java. If I wrap the commands in Xvfb-run commands then I can get both projects to work fine. We were hoping that the new chrome 59 headless functionality would eliminate the need for us to use Xvfb. From the documentation that I have seen this is supposed to be the case. Is there any advice you can give on this? Thanks!

I am using the following:
chromedriver 2.29
Selenium 3.44 have also tried it with 2.44
Chrome 59 Beta
CentOS Linux release 7.3.1611

Does it occur on multiple sites: Yes

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 59  Channel: n/a
OS Version: 
Flash Version:
 

Comment 1 by tkent@chromium.org, May 7 2017

Components: -Blink
Labels: Proj-Headless
Labels: Needs-Triage-M59
Components: Internals>Headless
Labels: TE-NeedsTriageHelp
I am also experiencing a similar issue when running chrome headless in docker.

When using a vanilla Centos 7 box and chrome-stable v59 with --headless --no-sandbox and --disable-gpu, I experience issues when trying to enter keystrokes into an input box.

"X display is required for keycode conversions, consider using Xvfb"

It seems to go against headless if xvfb is required
Forgot to mention that I'm using chromedriver 2.30
More discussion here. It is a chromedriver issue that will be fixed in 2.31

https://bugs.chromium.org/p/chromedriver/issues/detail?id=1772
Status: Fixed (was: Unconfirmed)
This should be fixed now in Canary with https://bugs.chromium.org/p/chromedriver/issues/detail?id=1772
fixed. 

Feel free to reopen if there's any issue

Sign in to add a comment