Ank*_*ain 11 amazon-ec2 headless-browser xvfb selenium-chromedriver
当我尝试运行我的selenium代码以在EC2 Box中启动chrome驱动程序和测试登录功能时,我收到以下错误.
我在另一个终端上运行这样的Xvfb服务器Xvfb :1 -screen 0 1366x768x24 -ac
.
我也加入export DISPLAY=:1
了/usr/bin/google-chrome-stable
Basicaly我正在尝试测试此链接上的登录功能:https://talentconnect.pge.com/sap/bc/webdynpro/sap/hrrcf_a_startpage_ext_cand?sap-wd-configId=ZPERJ_STARTPAGE_EXT_CAND&sap-client=810
一旦代码命中sendkey()
登录凭证,它就会出现此错误.
错误日志:
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: an X display is required for keycode conversions, consider using Xvfb
(Session info: chrome=31.0.1650.63)
(Driver info: chromedriver=2.8.240825,platform=Linux 3.2.0-36-virtual x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 83 milliseconds
Build info: version: '2.33.0', revision: '4ecaf82108b2a6cc6f006aae81961236eba93358', time: '2013-05-22 12:00:17'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-36-virtual', java.version: '1.7.0_25'
Session ID: 9e7150582926e064d5c93c97a87b9008
Run Code Online (Sandbox Code Playgroud)
小智 -1
更新 Selenium 和 ChromeDriver:docs.seleniumhq.org/download和chromedriver.storage.googleapis.com/index.html。正确的版本是首要必要的。
归档时间: |
|
查看次数: |
1240 次 |
最近记录: |