-3
我試圖在java中運行硒腳本。但每次我試圖創建Firefox驅動程序我得到這個錯誤無法運行java無頭硒
[WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows:
(process:32000): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
(firefox:32000): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Error: no display specified
關於我的問題的一些背景。
- 我試圖運行硒與Ubuntu 14.0.4在AWS EC2
- 我已經嘗試安裝XVFB因此火狐可以在無頭的模式下運行,並與一些參考運行XVFB(https://medium.com/@griggheo/running-selenium-webdriver-tests-using-firefox-headless-mode-on-ubuntu-d32500bb6af2#.u0hrlct41,https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c)
- 我可以在我的Java腳本硒「org.seleniumhq.selenium」%「硒的Java」%「2.53.1」沒有任何問題,運行硒Python腳本
- 我使用這個硒SBT,
任何人都可以幫助我運行使用Java的無頭硒?