Skip to content

Send keys option is not working. #27

@chatrapathik

Description

@chatrapathik

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions