Headless chrome sendkeys

1,013 views
Skip to first unread message

Chris

unread,
Sep 4, 2014, 10:38:32 AM9/4/14
to seleniu...@googlegroups.com
I'm using the headless chrome on ubuntu with the latest chromedriver version and the latest selenium version. I have xvfb running and everything works perfectly up until I try to use the sendkeys method to fill an input. When that method is called I'm seeing an error. Does anyone know how to resolve this or if there is a workaround? Here is the error...

org.openqa.selenium.WebDriverException: unknown error: an X display is required for keycode conversions, consider using Xvfb
  (Session info: chrome=37.0.2062.94)
  (Driver info: chromedriver=2.10.267518,platform=Linux 3.5.0-25-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 84 milliseconds
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'
System info: host: 'UbuntuDev', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.5.0-25-generic', java.version: '1.7.0_25'
Session ID: 4a3553280d3f5d9419d80d6372c285a4
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=/tmp/.com.google.Chrome.f8WbYG}, rotatable=false, locationContextEnabled=true, version=37.0.2062.94, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
        at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
        at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268)
        at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:89)

Krishnan Mahadevan

unread,
Sep 16, 2014, 10:15:24 AM9/16/14
to Selenium Users
Chris,
You might want to include the chromedriver.logs as well for what its worth so that someone may help you with this problem. I have never used the headless mode and as such I am not quite sure what is causing this only for sendKeys()

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/efe46e09-8e3f-43e6-a440-6f057fb72ee5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pkjay...@gmail.com

unread,
May 24, 2018, 10:27:50 PM5/24/18
to Selenium Users
Chris, Are you able to solve it? I am having issues with Headless Chrome and sendkey as mentioned by you. Did you get any solution?
Reply all
Reply to author
Forward
0 new messages