gpt4 book ai didi

selenium-webdriver - 未知错误 : an X display is required for keycode conversions

转载 作者:行者123 更新时间:2023-12-04 07:57:57 26 4
gpt4 key购买 nike

我正在尝试在 Centos 6 headless linux 上使用 appium 运行移动网络测试,但我不断收到此错误:

"info: [CHROMEDRIVER STDERR] No protocol specified

info: Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command.","origValue":"**unknown error: an X display is required for keycode conversions, consider using Xvfb\n** (Session info: chrome=webview)\n (Driver info:chromedriver=2.9.248316,platform=Linux 2.6.32-042stab088.4x86_64)"},"sessionId":"8563fbe5972f3ba87673c7a082d49d22"}
POST /wd/hub/session/8563fbe5972f3ba87673c7a082d49d22/element/0.06753459526225924-1/value 500 1927ms - 395b

debug: Appium request initiated at /wd/hub/session/8563fbe5972f3ba87673c7a082d49d22

debug: Request received with params: {}

info: Shutting down appium session..."

它打开 chrome 浏览器并导航到给定的 url。之后,它尝试将 sendKeys 发送到用户名字段,然后失败。

最佳答案

请在此处找到可能的解决方案: http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/

它适用于 Ubuntu,也许类似的解决方案适用于 CentOS。由于某些原因,我不得不使用更大的帧缓冲区启动 Xvfb

sudo Xvfb :10 -ac -screen 0 4000x2000x8

关于selenium-webdriver - 未知错误 : an X display is required for keycode conversions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24126462/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com