I am using selenium webdriver.Chrome to create a webdriver with specific functionality for my test environment.
class MyDriver(webdriver.Chrome):
def __init__(self, executable_path="chromedriver", port=0,
chrome_options=None, service_args=None,
desired_capabilities=None, service_log_path=None):
super().__init__(executable_path, port, chrome_options, service_args,
desired_capabilities, service_log_path)
# vdisplay = Xvfb()
# vdisplay.start()
part of the test includes sending keys with element.send_keys(value)
,
The tests ran fine until a few days ago it started crashing with this message:
"selenium.common.exceptions.WebDriverException: Message: unknown error: an X display is required for keycode conversions, consider using Xvfb (Session info: chrome=59.0.3071.115) (Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.10.0-22-generic x86_64)"
I searched and researched over and over I don't understand the error...
I'm using:
- Python 3.6
- Selenium
- PyCharm
- chromedriver linux_64bit 2.27.440175
The only useful link I found was a bug opened by chromium at: https://bugs.chromium.org/p/chromedriver/issues/detail?id=1772 but I am unfamiliar with there tools...
I would like to Know if anyone has a solution for sending keys or fixing this bug I have tried removing chrome and downgrading it... it did not help!
Any help would be appreciated!
Thanks