Headless chrome sendkeys

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Headless chrome sendkeys

Chris-2
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)

--
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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Headless chrome sendkeys

Krishnan Mahadevan
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/

On Thu, Sep 4, 2014 at 8:08 PM, Chris <[hidden email]> wrote:
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)

--
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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLkUVuH78QudmzPWkadhBeMS16T23fnwbEp%3DQR5g11vVuQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Headless chrome sendkeys

pkjayee1301
In reply to this post by Chris-2
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?

On Thursday, 4 September 2014 08:38:32 UTC-6, Chris wrote:
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', <a href="http://os.name/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG5fvA54qOnV_yK6Ny2Ap-bOAWnfw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG5fvA54qOnV_yK6Ny2Ap-bOAWnfw&#39;;return true;">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)

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/5be207f2-3246-4fa9-85d7-8bfaa7fcad33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.