Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send keys option is not working. #27

Open
chatrapathik opened this issue Aug 12, 2017 · 1 comment
Open

Send keys option is not working. #27

chatrapathik opened this issue Aug 12, 2017 · 1 comment

Comments

@chatrapathik
Copy link

chatrapathik commented Aug 12, 2017

Hii Adams,

  • We used your image(python2) to run the selenium test cases.
  • image
  • In single file, we wrote two test cases
    1: One with send keys,
    2: Another one without sending keys.
  • The test case without using send keys is passed and another one with sending keys is failed.
  • Test_case file link
  • This is the final output
test_google_with_send_keys (testing.ExampleTests) ... ERROR
test_google_without_send_keys (testing.ExampleTests) ... ok

======================================================================
ERROR: test_google_with_send_keys (testing.ExampleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/tests/testing.py", line 19, in test_google_with_send_keys
    input_box.send_keys('apple', Keys.RETURN)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 349, in send_keys
    'value': keys_to_typing(value)})
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 493, in _execute
    return self._parent.execute(command, params)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 256, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)
WebDriverException: Message: unknown error: an X display is required for keycode conversions, consider using Xvfb
  (Session info: chrome=57.0.2987.98)
  (Driver info: chromedriver=2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f),platform=Linux 3.13.0-38-generic x86_64)


----------------------------------------------------------------------
Ran 2 tests in 15.282s

FAILED (errors=1)


  • Can you please suggest how can we resolve this issue.Thanks!
@rajanram
Copy link

rajanram commented Oct 6, 2017

I got it working by replacing the line
chromium --no-sandbox $@ &
with
chromium --no-sandbox --headless $@ &
in the file
https://github.com/mark-adams/docker-chromium-xvfb/blob/master/images/base/xvfb-chromium

Hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants